-
-
Notifications
You must be signed in to change notification settings - Fork 11
File delete fix on high load #50
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
Conversation
|
Codecov ReportBase: 95.74% // Head: 93.19% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #50 +/- ##
============================================
- Coverage 95.74% 93.19% -2.55%
- Complexity 66 68 +2
============================================
Files 1 1
Lines 141 147 +6
============================================
+ Hits 135 137 +2
- Misses 6 10 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Need tests. |
Any ideas how it can be done? |
|
It's hard to test race conditions. I think we can skip these for the case. @sartor would you please add a line for CHANGELOG? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
|
Yes, likely. |
|
Yes. I'm using on prod my fork for a week, and fixed line weren't produced any new errors. |
…les on high load
…les on high load
On high load projects sometimes there is an error trying to delete file. This happens because of not atomic check if file exists and actual delete:
In old yii2 file cache result of key delete not throw any error.
This PR tries to return false only if
unlinkcall error caused by any reason except file already deletedI can't do simple test to prove fix, but I've checked it by calling first
unlinkjust afteris_file()check