Fix folder size contained in S3 buckets#28185
Merged
juliusknorr merged 1 commit intomasterfrom Aug 20, 2021
Merged
Conversation
1c04f22 to
e05aa2c
Compare
juliusknorr
reviewed
Jul 27, 2021
juliusknorr
reviewed
Jul 27, 2021
artonge
commented
Jul 28, 2021
Member
|
I investigated a similar issue with using Group Folders with the S3 storage with Vincent last week:
|
Member
|
ref: nextcloud/groupfolders#1630 but probably not related because the latter is for group folders and the problem with S3 primary happens also without |
aea7a2e to
bdd1a35
Compare
Contributor
Author
|
/backport to stable22 |
Contributor
Author
|
/backport to stable21 |
If 'filesystem_check_changes' was set to never, the cached size was alway set to -1 (Pending) on every access Signed-off-by: Louis Chemineau <louis@chmn.me>
bdd1a35 to
735fd94
Compare
PVince81
approved these changes
Aug 20, 2021
Member
PVince81
left a comment
There was a problem hiding this comment.
Alright, since the solution covers all the interesting cases let's move forward 👍
juliusknorr
approved these changes
Aug 20, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Folders contained in S3 bucket's are displayed with a size of "Pending".
The following command can get the real size to be displayed, but only for one refresh:
php occ files:scan --path "<S3 bucket path>"Rational (I might be wrong):
statmethod on the S3 folder, themtimeis always set to 'now'.hasUpdatedmethod fromFiles/Storage/Common.phpto always returnstrue,needsUpdatemethod inFiles/View.phpto always returnstruetoo.Files/Cache/Scanner.phpevery time the folder is acceceed. But it gets updated with a size of-1because the size for S3 folders is not getting computed and default to-1Need guidance on how and where we should address this issue :).