feat: move file cache from view to node api#52000
feat: move file cache from view to node api#52000icewind1991 wants to merge 2 commits intomasterfrom
Conversation
e61a052 to
5556307
Compare
come-nc
left a comment
There was a problem hiding this comment.
Where is this class used? I can only find it used for registering its garbage collector.
e382471 to
c89e3c2
Compare
7ce6a54 to
82e6977
Compare
| protected function run(mixed $argument): void { | ||
| $offset = $this->appConfig->getValueInt('core', 'files_gc_offset'); | ||
|
|
||
| $users = $this->userManager->getSeenUsers($offset); |
There was a problem hiding this comment.
It's an int offset and starting over will catch newly added users, so that is not a problem I guess? 🙈
| return; | ||
| } | ||
| } | ||
| $this->appConfig->setValueInt('core', 'files_gc_offset', 0); |
There was a problem hiding this comment.
This however always resets to the start, if the gc for the 1k users in above loop took less then 23h, it will never do page 2+
| $now = time(); | ||
|
|
||
| // almost time for the next job run, stop early and save our location | ||
| if ($now - $start > 23 * 60 * 60) { |
There was a problem hiding this comment.
Should stop after ~6h if possible so the "maintenance window" is respected.
On the other side if the instance has millions of users, if we only do 1k users per night, this will not scale?
82e6977 to
18b1011
Compare
|
Dropped the "move to background job" from this PR so the underlying improvements can be merged independently. |
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
18b1011 to
ba26cac
Compare
Also changes the explicit full-filesystem setup to the normal implicit filesystem setup that can do the optimized path of only setting up the home storage.