Commit graph

19 commits

Author SHA1 Message Date
Olivier Goffart
cb38bb2b5e
Fix Upload of large (> 2GiB) files
Issue #7506

This is a regression introduced by the delta sync feature (as the chunk offset
changed from being the chunk number to be the byte offset, it needs to be a
qint64 now)
2020-12-15 10:59:01 +01:00
Christian Kamm
b974f579ae
Chunked upload: Fix percent encoding in If header #7176 2020-12-15 10:58:50 +01:00
Christian Kamm
4c04351360
Fix warnings about signedness
Sizes are always qint64, not unsigned.
TransferIds are always uint.
2020-12-15 10:58:41 +01:00
Olivier Goffart
640cf0c71e
Fix leaks in tests
As discovered by AddressSanitizer
2020-12-15 10:58:11 +01:00
Kevin Ottens
ef6d2600ca
Size cleanups in TestChunkingNG
Some of the comments didn't match the size or were missing. This also
means reducing one of the 150 MB payloads left behind reducing the
execution time by a few more seconds. This is now around 30s execution
time which is more acceptable.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-13 16:46:14 +02:00
Olivier Goffart
c2324327ef
TestChunkingNG: Make it faster
Use smaller files so the test run faster.
Particulary usefull for TestChunkingNG::connectionDroppedBeforeEtagRecieved
Which had become so much slower after 2638332dc6
increased the timeout for bigger files
2020-08-13 16:46:03 +02:00
Christian Kamm
c74c0d8e6e
Upload: Add more chunk resuming unit tests #6405 2020-08-13 16:45:55 +02:00
Christian Kamm
77fcff5bdf
Conflicts: Change tags to be more user friendly #6365
From "_conflict-user-yyyymmdd-hhmmss"
to   " (conflicted copy user yyyy-mm-dd hhmmss)"
2018-06-11 14:40:40 +02:00
Christian Kamm
3556482bce
TestChunkingNG: Remove unneeded test code 2018-06-07 08:53:12 +02:00
Olivier Goffart
012c638d4e
Uploads: Don't delete unexisting chunks
Since commit 4dc49ff3, we store an entry in the upload info table even
for non chunked uploads. However, if this fails we don't want to remove
non-existant stale chunks if the upload fails.

Without this commit, we would send a DELETE command to clean non-existant
chunks in the dav/uploads/ namespace.
2018-06-06 09:52:02 +02:00
Olivier Goffart
4dc49ff3b0 SyncEngine: Recover when the PUT reply (or chunkin's MOVE) is lost
This can happen if the upload of a file is finished, but we just got
disconnected right before recieving the reply containing the etag.
So nothing was save din the DB, and we are not sure if the server
recieved the file properly or not. Further local update of the file
will cause a conflict.

In order to fix this, store the checksum of the uploading file in
the uploadinfo table of the local db (even if there is no chunking
involved).  And when we have a conflict, check that it is not because
of this situation by checking the entry in the uploadinfo table.

Issue #5106
2017-12-14 11:56:12 +01:00
Olivier Goffart
4369853ddb TestSystem: Add QIODevice in the serverOverride function, and add a DelayedReply
Preparing to add test that needs the QIODevice.
Also make the DelayedReply so we can generalize the existing delay on FakeChunkMoveReply
to any reply.
2017-12-14 11:56:12 +01:00
Olivier Goffart
96dede4e84 TestChunkingNG: Test that resuming does not send past data. 2017-11-21 11:19:14 +01:00
Christian Kamm
2ac7e0200a Test case for #5949 2017-10-17 09:44:52 +02:00
Olivier Goffart
8a70d22af7 ChunkingNG: Add some tests
- Test that we recover correctly if the chunks were removed on the server.
 - Test changing the file localy while uploading.
2017-01-20 14:48:53 +01:00
Olivier Goffart
a63d970e5e 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.
2017-01-20 14:48:53 +01:00
Olivier Goffart
f6c77fad17 ChunkingNG: delete stale chunks if the file was changed locally
Relates to https://github.com/owncloud/core/issues/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
2017-01-20 14:48:53 +01:00
Olivier Goffart
15f2b911d9 ChunkingNG: remove stale files when resuming 2016-11-04 16:43:01 +01:00
Olivier Goffart
c8014a0afd ChunkingNG: Add Test 2016-10-31 15:16:53 +01:00