-
Notifications
You must be signed in to change notification settings - Fork 684
Chunking ng cleanup #5480
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
Chunking ng cleanup #5480
Conversation
Relates to owncloud/core#26981 We do not track the success or error of the DeleteJob because it does not matter. If it fails, it might be because the chunks were already removed. If not, the chunks will be stale, but the server must anyway do a few cleanup from time to time because we do not always remove the chunks
Stale chunks might be there because a file was removed or would just not be uploaded, for any reason. We just start the DeleteJob but we don't care if it success or not. Relates to owncloud/core#26981 One of the test is testing the case where the file is modified on the server during the upload. So this test the precondition failed error. The FakeGetReply logic was modified because resizing a 150MB big QByteArray by increment of 16k just did not scale when downloading a big file.
- Test that we recover correctly if the chunks were removed on the server. - Test changing the file localy while uploading.
67029e9 to
8a70d22
Compare
|
Is this for 2.3? |
|
is this 2.3 material? |
jturcotte
left a comment
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.
Looks good, just a nitpick.
| // The upload info is stale. remove the stale chunks on the server | ||
| _transferId = progressInfo._transferid; | ||
| // Fire and forget. Any error will be ignored. | ||
| (new DeleteJob(propagator()->account(), chunkUrl(), this))->start(); |
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.
It would be a bit cleaner and safer if chunkUrl would take the transferId as parameter (and could be made static) instead of having to set the variable and reset it later.
| if (account()->capabilities().chunkingNg()) { | ||
| foreach (uint transferId, ids) { | ||
| QUrl url = Utility::concatUrlPath(account()->url(), QLatin1String("remote.php/dav/uploads/") | ||
| + account()->davUser() + QLatin1Char('/') + QString::number(transferId)); |
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.
Could this use the same chunkUrl implementation?
Will help for owncloud/core#26981