Hannah von Reth [Mon, 16 Dec 2019 15:33:41 +0000 (16:33 +0100)]
Don't ignore file sync notification after an unlock
For a usual file sync event we check for actual changes in the local file,
after an unlock the local file might be unchanged so we need to sync it anyhow.
Olivier Goffart [Wed, 13 Nov 2019 10:12:32 +0000 (11:12 +0100)]
Discovery: Allow more HTTP error code to be treated as ignored dir
The original code from csync was stopping at any error.
But we have been whitelisting soeme http error code one by one
to ignore the directory instead of aborting the sync.
However, as there are more requests to continue the sync in case
of error, just ignore most HTTP errors
Olivier Goffart [Thu, 31 Oct 2019 09:41:38 +0000 (10:41 +0100)]
Discovery: fix TestSyncVirtualFiles::testExtraFilesLocalDehydrated on windows
On windows we do a test to know if we should change the case of the files,
but that conflict with the test that checks if the file was still there
when the filename is actually the same. Which can happen with virtual files
as they have two representation (the one with and without suffix).
Olivier Goffart [Thu, 10 Oct 2019 11:21:28 +0000 (13:21 +0200)]
Restoration items should appear in the sync protocol
When an item is downloaded because it is restored, it shall be shown in the
sync protocol.
(It is also going to be shown in the not synchronized for a short while, but
that's fine)
Olivier Goffart [Wed, 9 Oct 2019 07:31:00 +0000 (09:31 +0200)]
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)
Christian Kamm [Fri, 6 Sep 2019 12:33:37 +0000 (14:33 +0200)]
ConnectionValidator: increase timeout to 57s #7456
When the gui thread blocks for several seconds it's possible for the
ConnectionValidator to timeout and decide that the account is
unreachable. It will then terminate all sync runs.
Increasing the timeout makes this less likely to happen. The tradeoff is
that real disconnects will not be detected as quickly.
This does not address the root cause but makes the symptom less likely
to appear.
Christian Kamm [Wed, 28 Aug 2019 12:20:40 +0000 (14:20 +0200)]
Discovery: If a move is forbidden, restore the source
Previously the source was deleted (or attempted to be deleted), even if
the new location was not acceptable for upload. This could make data
unavilable on the server.
Christian Kamm [Mon, 12 Aug 2019 06:23:40 +0000 (08:23 +0200)]
Download: Don't trigger too many concurrent hash computations
Previously the job would only become "active" when the downloads
started. That meant that arbitrarily many hash computations could be
queued at the same time.
Since the the file was opened during future creation this could lead to
a "too many open files" problem if there were lots of new-new conflicts.
To change this:
- Make PropagateDownload become active when computing a hash
asynchronously.
- Make the computation future open the file only once it gets run. This
will make it less likely for this problem to occur even if thousands
of these futures are queued.
Christian Kamm [Thu, 27 Jun 2019 13:47:04 +0000 (15:47 +0200)]
VfsSuffix: Wipe stale pin states #7273
Previously the pin states of deleted files stayed in the 'flags'
database and could be inadvertently reused when a new file with the same
name appeared. Now they are deleted.
To make this work right, the meaning of the 'path' column in the 'flags'
table was changed: Previously it never had the .owncloud file suffix.
Now it's the same as in metadata.path.
This takes the safe parts from #7274 for inclusion in 2.6. The more
elaborate database schema changes (why use 'path' the join the two
tables in the first place?) shall go into master.
Christian Kamm [Fri, 21 Jun 2019 13:29:42 +0000 (15:29 +0200)]
RequestEtagJob: Consistently parse etags #7271
Previously RequestEtagJob did return the etag verbatim (including extra
quotes) while the db had the parsed form. That caused the etag
comparison during discovery move detection to always fail. The test
didn't catch it because the etags there didn't have quotes.
Now:
- RequestEtagJob will parse the etag, leading to a consistent format
- Tests have etags with quotes, detecting the problem
Christian Kamm [Fri, 21 Jun 2019 09:34:59 +0000 (11:34 +0200)]
UploadDevice: Fix windows issues #7264
- Close the UploadDevice to close the QFile after the PUT job is done.
This allows winvfs to get an oplock on the file later.
- Don't rely on QFile::fileName() to be valid after
openAndSeekFileSharedRead() was called. The way it is openend on
Windows makes it have an empty filename.
Christian Kamm [Fri, 21 Jun 2019 07:06:07 +0000 (09:06 +0200)]
Vfs: Don't let new local files start out unpinned #7250
If one adds a new file to an online-only folder the previous behavior
was to upload the file in one sync and dehydrate it in the next. Now
these new files get set to Unspecified pin state, making them retain
their data.
Christian Kamm [Thu, 6 Jun 2019 10:22:02 +0000 (12:22 +0200)]
Upload: Read file chunks gradually #7226
Instead of all at once, to reduce peak memory use.
Changing UploadDevice in this way requires keeping the file open for the
duration of the upload. It also means changes to open(), seek(), close()
to ensure that uses of the device work right when a request needs to
be resent.
Christian Kamm [Wed, 5 Jun 2019 13:24:57 +0000 (15:24 +0200)]
Http2: Resend requests on ContentReSend error #7174
Since Qt does not yet transparently resend HTTP2 requests in some cases
we do it manually.
The test showed a problem where the initial non-200 reply would close
the target temporary file and the follow-up request couldn't store any
data. Removing that close() call is safe because there also is a
_saveBodyToFile flag that guards writes to the target file.
Christian Kamm [Tue, 23 Apr 2019 11:38:58 +0000 (13:38 +0200)]
Vfs: Mark sqlite temporaries excluded on db-open #7141
The previous patch ensured that the sqlite temporaries weren't deleted
and recreated for every sync run, but there was still time between
client startup and the first sync run where they would have the
"needs-sync" icon.