Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle race condition when creating cache directory #89

Merged
merged 5 commits into from
Jan 13, 2025
Merged

Conversation

vjik
Copy link
Member

@vjik vjik commented Jan 11, 2025

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fix #86

Copy link

codecov bot commented Jan 11, 2025

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.66%. Comparing base (c4fcb8f) to head (0362ce1).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/FileCache.php 91.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #89      +/-   ##
============================================
+ Coverage     91.19%   91.66%   +0.47%     
  Complexity       69       69              
============================================
  Files             1        1              
  Lines           159      168       +9     
============================================
+ Hits            145      154       +9     
  Misses           14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vjik vjik added the status:code review The pull request needs review. label Jan 11, 2025
@vjik vjik requested a review from a team January 11, 2025 15:55
src/FileCache.php Show resolved Hide resolved
src/FileCache.php Show resolved Hide resolved
vjik and others added 2 commits January 12, 2025 08:29
Co-authored-by: Sergei Tigrov <[email protected]>
Co-authored-by: Sergei Tigrov <[email protected]>
@samdark
Copy link
Member

samdark commented Jan 12, 2025

I wonder how bad is performance hit in this case...

@vjik
Copy link
Member Author

vjik commented Jan 12, 2025

I wonder how bad is performance hit in this case...

Probably not much. It's not affect case when folder already exists, but in cases when need to create directory error handler costs are low compared tocost of creating a folder, aren't it?

@samdark
Copy link
Member

samdark commented Jan 12, 2025

Right. Usually the directory will be already there.

@vjik vjik merged commit 95983b9 into master Jan 13, 2025
23 checks passed
@vjik vjik deleted the mkdir-fix branch January 13, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error creating cache file
4 participants