-
-
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 total upload size overwritten by next upload #24833
Merged
rullzer
merged 1 commit into
master
from
fix-total-upload-size-overwritten-by-next-upload
Dec 28, 2020
Merged
Fix total upload size overwritten by next upload #24833
rullzer
merged 1 commit into
master
from
fix-total-upload-size-overwritten-by-next-upload
Dec 28, 2020
Conversation
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
The upload progress is based on the "totalToUpload" variable. However, as the variable is set when an upload is submitted, if another upload is submitted before the previous one finished the upload progress only took into account the size of the new upload (although the upload itself worked fine; the files of the new submitted upload are added to the active one). Now "totalToUpload" is either increased or set depending on whether an upload is active or not. Note that although "data.total" holds the total size of the files being uploaded "totalToUpload" needs to be used in "fileuploadprogressall" instead; "totalToUpload" is calculated when the upload is submitted, but since 7c4c5fe the actual upload of the files, and thus updating the value of "data.total", may be deferred until the parent folders were created. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
danxuliu
requested review from
rullzer,
ChristophWurst,
juliusknorr and
skjnldsv
December 23, 2020 18:00
/backport to stable20 |
/backport to stable19 |
/backport to stable18 |
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 693: failureacceptance-users
Show full log
|
ChristophWurst
approved these changes
Dec 23, 2020
rullzer
approved these changes
Dec 28, 2020
This was referenced Dec 28, 2020
The backport to stable18 failed. Please do this backport manually. |
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.
This fixes a regression introduced in 7c4c5fe
The upload progress is based on the
totalToUpload
variable. However, as the variable is set when an upload is submitted, if another upload is submitted before the previous one finished the upload progress only took into account the size of the new upload (although the upload itself worked fine; the files of the new submitted upload are added to the active one). NowtotalToUpload
is either increased or set depending on whether an upload is active or not.Note that although
data.total
holds the total size of the files being uploadedtotalToUpload
needs to be used infileuploadprogressall
instead;totalToUpload
is calculated when the upload is submitted, but since 7c4c5fe the actual upload of the files, and thus updating the value ofdata.total
, may be deferred until the parent folders were created.How to test
dd if=/dev/urandom of=test-file-5mib bs=1K count=5K
)dd if=/dev/urandom of=test-file-100kib bs=1K count=100
)Result with this pull request
The upload progress is based on the size of both files
Result without this pull request
The upload progress is based only on the size of the last file