-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
FIX #38801: Missing metadata for chunked upload #41149
Closed
cfiehe
wants to merge
1
commit into
nextcloud:master
from
cfiehe:fix_missing_metadata_for_chunked_upload
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
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.
I think this would break getting the actual upload folder in prepareUpload. I also cannot see this bug happening on my s3 test setup.
The directory name is already being used within the prepareUpload method https://github.com/cfiehe/server/blob/fix_missing_metadata_for_chunked_upload/apps/dav/lib/Upload/ChunkingV2Plugin.php#L314C51-L314C51
Just a question for checking an idea: Do you have either redis or apcu setup for caching? Can you maybe share your
occ config:list
output?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.
My guess is that you don't have a proper cache and therefore getting the metadata fails. With your patch getting the upload folder fails but the NotFound exception is catched and returning early which leads to the regular chunking plugin to be taken as the fallback.
server/apps/dav/lib/Upload/ChunkingV2Plugin.php
Lines 149 to 150 in 2124fb9
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.
The strange is, that the problem arises when you have multiple Nextcloud servers. We have an active-active loadbalanced cluster which consists of three Nextcloud servers. When you have only one server, the upload succeeds, but in a multi-node setup it fails.
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.
This is our configuration. We use a small NFS share, where the Nextcloud sources are stored, so the three servers share the same configuration. Is there any issue here?
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.
Is the redis server shared between both instances?
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, we are using a virtual IP in order to access the Redis Sentinel Cluster. This IP always points to the primary node. The Redis cluster runs on three dedicated virtual machines.
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.
I have found the problem. It was a typo in the configuration file 🙈. I wrote
memcache.disributed
instead ofmemcache.distributed
. Everything is working now and large files are being uploaded without any issue.@juliushaertl Thanks a lot for the caching hint and my sincerest apology for generating efforts.
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.
No worries I think this still needs a proper fix to not fail if no distributed cache is available, I can check that next week.