ChunkingNG: remove stale chunks when cleaning the uploadInfo table
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 https://github.com/owncloud/core/issues/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.
Esse commit está contido em:
@@ -23,6 +23,7 @@
|
||||
#include "syncfilestatus.h"
|
||||
#include "csync_private.h"
|
||||
#include "filesystem.h"
|
||||
#include "propagateremotedelete.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windows.h>
|
||||
@@ -301,7 +302,16 @@ void SyncEngine::deleteStaleUploadInfos()
|
||||
}
|
||||
|
||||
// Delete from journal.
|
||||
_journal->deleteStaleUploadInfos(upload_file_paths);
|
||||
auto ids = _journal->deleteStaleUploadInfos(upload_file_paths);
|
||||
|
||||
// Delete the stales chunk on the server.
|
||||
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));
|
||||
(new DeleteJob(account(), url, this))->start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SyncEngine::deleteStaleErrorBlacklistEntries()
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário