ChunkingNG: remove stale chunks when cleaning the uploadInfo table
authorOlivier Goffart <ogoffart@woboq.com>
Fri, 20 Jan 2017 12:59:13 +0000 (13:59 +0100)
committerOlivier Goffart <ogoffart@woboq.com>
Fri, 20 Jan 2017 13:48:53 +0000 (14:48 +0100)
commita63d970e5ef39b6de3f55a75a4cabb8b4bbd18dc
treee88f72f8704e45972cc76d833748c58ca60cc986
parentf6c77fad17060bf25f4e6591360340670ba2dd1c
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.
src/libsync/syncengine.cpp
src/libsync/syncjournaldb.cpp
src/libsync/syncjournaldb.h
test/syncenginetestutils.h
test/testchunkingng.cpp