fix(propagateupload): ensure file size stays the same for new uploads#9823
Open
fix(propagateupload): ensure file size stays the same for new uploads#9823
Conversation
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
It is possible that the sync engine discovers a file with a small enough file size to use the old V1 upload propagator. This is fine unless the file size is still growing between discovery and propagation; should the file grow large enough before propagation starts the propagator job may attempts to upload the file in chunks using the old (removed with Nextcloud 30) chunking mechanism. Since Nextcloud 30 this no longer works as it only has support for V2 upload chunking (PropagateUploadFileNG), resulting in broken partial uploads while the client believes everything got uploaded. The PropagateUploadFileCommon job already checks whether the file is different, however relying on just the mtime is not enough for new files. Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
Member
Author
|
/backport to stable-33.0 please |
Member
Author
|
/backport to stable-4.0 |
|
Artifact containing the AppImage: nextcloud-appimage-pr-9823.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|
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.




It is possible that the sync engine discovers a new file with a small enough file size to use the old V1 upload propagator. This is fine unless the file is still being written to between discovery and propagation (this could happen when copying large files); should the file grow large enough before propagation starts the propagator job may attempts to upload the file in chunks using the old (removed with Nextcloud 30) chunking mechanism. Since Nextcloud 30 this no longer works as it only has support for V2 upload chunking (PropagateUploadFileNG), resulting in broken partial uploads while the client believes everything got uploaded.
The PropagateUploadFileCommon job already checks whether the file is different, however relying on just the mtime is not enough for newly discovered files.
Resolves #9271