Trashbin memory#35094
Conversation
Codecov Report
@@ Coverage Diff @@
## master #35094 +/- ##
============================================
- Coverage 65.37% 65.29% -0.08%
- Complexity 18626 18650 +24
============================================
Files 1215 1215
Lines 70532 70618 +86
Branches 1295 1295
============================================
Hits 46112 46112
- Misses 24046 24132 +86
Partials 374 374
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #35094 +/- ##
=============================================
- Coverage 65.68% 48.9% -16.79%
=============================================
Files 1221 109 -1112
Lines 70793 10566 -60227
Branches 1288 1288
=============================================
- Hits 46503 5167 -41336
+ Misses 23913 5022 -18891
Partials 377 377
Continue to review full report at Codecov.
|
415e5d5 to
3f466b3
Compare
|
@jvillafanez @pako81 Is this code still needed? I see in the original ticket that you need a new ticket? |
|
@micbar it is still under investigation. We are trying to verify if 10.2.0, which should already come with some improvements in terms of memory usage, is already solving the issue. If not, it may be required to apply this code and check the outcome. |
|
It's on my radar. I got side-tracked with other more urgent things. |
|
I don't think I can add more tests here:
The rest of the changes should be already covered by previous tests. |
24f429b to
b4b2af3
Compare
|
Not sure how to proceed here. There are several problems with the tests due to a confusing architecture around the Files/Cache. Options:
|
|
I think I'll close this PR and create a new one fixing the memory leaks found. Although using a generator in the trashbin was a good idea to reduce memory usage, it requires changes in the Cache implementation which either needs to be in the interface or we need to downcast to a private implementation. For consistency, if we downcast to a private implementation (which is wrong because the expected implementation is in core, not in the trashbin app), we'll also need to handle the rest of the implementation somehow, so we'll still need to rely on the interface. Sound better to rely on the interface in the first place. If we decide to create a new method in the interface, all the implementations needs to provide something similar. This is starting to get out of scope. The additional problem is that the wrappers also need to implement the same method. This method have to return a generator which wraps the returned generator. |
|
Simplified version of the expected solution is in #35612 |
|
@jvillafanez ok for me , please proceed as proposed :-) |
|
Closing in favour of #35612 |
|
Closed, so backport not needed |
Description
Reduce memory usage in the TrashExpire background job
Related Issue
https://github.com/owncloud/enterprise/issues/2925
Motivation and Context
There have been problems related to excesive memory usage, probably caused by an abnormally big trashbin.
Note that problems with excesive group caching has also been detected, but the fix isn't implemented here yet. In addition, the
Trashbin::getLocationscalls should also be changed.How Has This Been Tested?
Manually tested with 3 users and a bunch of files inside a couple of folders. The code has been slightly changed to get the peak memory usage in several places.
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: