-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Free resources in preview providers #30507
Conversation
@PVince81 could be the reason. |
Codecov Report
@@ Coverage Diff @@
## master #30507 +/- ##
============================================
- Coverage 61.59% 61.59% -0.01%
Complexity 18505 18505
============================================
Files 1090 1090
Lines 61104 61108 +4
============================================
+ Hits 37640 37642 +2
- Misses 23464 23466 +2
Continue to review full report at Codecov.
|
I did some tests of the "randomly failing" PR #30509 - on PR #30510 - doing lots of So there is no very much difference without without this PR. This PR is still "a good looking thing". It just does not seem to make a big difference to the time window when the file is locked while generating a preview. |
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.
In general it's not a good idea to rely on PHP's garbage collector to close files as it might happen much later than expected and different PHP versions behave differently.
So this is a great step forward, let's merge this unless it breaks other things 👍
If UI tests still fail randomly then maybe there is yet another undiscovered code path related to previews. @VicDeo does the preview as requested from the URL go through other code paths not covered here ? |
The random failures that I can see are actually genuine. The file on the server has to be read-locked while the server reads it to make the preview thumbnail. During that time, requests to overwrite/delete etc are going to get a "file locked" response. UI tests have been enhanced to handle that case, looking for the "file locked" notfication on the UI - PR #30513 - it is just waiting for CI to finish again after some minor code format review changes. |
IMO this [can|should] be merged - @PVince81 press that button if you are happy. |
please backport this fix |
Stable10: #30533 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Dispose unneeded resources ASAP
Related Issue
#30506
Motivation and Context
Driven by random build failures
How Has This Been Tested?
Not tested in general as original issue is a Heisenbug
So I just checked that previews are still shown for affected mimes
Screenshots (if appropriate):
Types of changes
Checklist: