Commit graph

15681 commits

Author SHA1 Message Date
Hannah von Reth
dc55617144
Ensure the url is complete before we validate it
Fixes: #6722
2020-12-15 10:59:00 +01:00
Christian Kamm
c9476a11f4
Checksums: Explicitly close file before reporting result
To ensure it's no longer open when the finished signal fires.
2020-12-15 10:59:00 +01:00
Christian Kamm
e91e1ca78f
Test: Disable local discovery parallelism in permission test
Adding parallelism broke the test because it depended on the order of
discovery.
2020-12-15 10:59:00 +01:00
Christian Kamm
e596b55977
Discovery: Change local job signal signatures
To make it more explicit that data a copy of the data is transfered
between threads. (though Qt will make a copy of the arguments anyway)
2020-12-15 10:58:59 +01:00
Christian Kamm
71f71b38f1
Discovery: local job shouldn't be parented
Since it'll be deleted by the thread pool.
2020-12-15 10:58:59 +01:00
Christian Kamm
53a217d4e4
Don't store pointer to local job
There were crashes in the QPointer assignment. Possibly the thread pool
is done with the job and deletes it before the assignment is done.
2020-12-15 10:58:59 +01:00
Markus Goetz
26b5e36351
Discovery: List local directories from thread #7456 #7439 2020-12-15 10:58:59 +01:00
Markus Goetz
09a0dbbf82
Reconcile: Sort already during discovery #7445 2020-12-15 10:58:59 +01:00
Christian Kamm
a5c6612883
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.
2020-12-15 10:58:59 +01:00
Markus Goetz
41dc68f99c
Propagator: Delay job execution a bit #7439 2020-12-15 10:58:58 +01:00
Christian Kamm
e37e954720
Discovery: Remove level of indent around moves
No code changes.
2020-12-15 10:58:58 +01:00
Christian Kamm
28797baa39
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.

For #7410
2020-12-15 10:58:58 +01:00
Christian Kamm
c9d1037622
Propagation: Fix delete-before-rename bug #7441
By introducing a PropagateRootDirectory job that explicitly
separates the directory deletion jobs from all the other jobs.

Note that this means that if there are errors in subJobs the
dirDeletionJobs won't get executed.
2020-12-15 10:58:58 +01:00
Markus Goetz
475117dd60
Propagator: Make sure we schedule only one job #7439
To not starve the event loop.
(There is still ~= 3 jobs running at the same time)
2020-12-15 10:58:58 +01:00
Christian Kamm
3446412d92
PropagateDownload: Don't try to open readonly temporaries
This situation could arrise when receiving a read-only share and the
temporary rename failed for some reason.

See #7419
2020-12-15 10:58:58 +01:00
Hannah von Reth
f78c4f851b
Change Windows virtual files description to tech preview 2020-12-15 10:58:57 +01:00
Christian Kamm
0ac8a3e6be
Don't fatal on "Storage temporarily unavailable"
This is an unreliable workaround. The real fix will need to be deferred
to another release.

For #5088
2020-12-15 10:58:57 +01:00
Hannah von Reth
afc9cd2f46
OwncloudWizard: Mark vfs as tech preview instead of experimental 2020-12-15 10:58:57 +01:00
Hannah von Reth
e5a36c3bc6
CMake VFS: Enable us to provided vfs plugins from an external directory 2020-12-15 10:58:57 +01:00
Dominik Schmidt
7e4d24de2b
SocketApi: Avoid unneccessary conversions 2020-12-15 10:58:57 +01:00
Dominik Schmidt
06ac1c33e8
SocketApi: cleanup debug output 2020-12-15 10:58:57 +01:00
Dominik Schmidt
25cd52dd9f
Add ASYNC_ASSERT_ICON_IS_EQUAL command to SocketApi 2020-12-15 10:58:57 +01:00
Dominik Schmidt
d1f9b1a4f8
Make findWidget more powerful 2020-12-15 10:58:56 +01:00
Dominik Schmidt
67656fb136
Add Q_PROPERTYs for gui testing 2020-12-15 10:58:56 +01:00
Dominik Schmidt
596154a01a
Switch GUI Testing SocketApi to Utf8 2020-12-15 10:58:56 +01:00
Dominik Schmidt
ad033e40fd
Fix build with recent Clang (on Linux) 2020-12-15 10:58:56 +01:00
Dominik Schmidt
3288a36da6
Add GUI testing SocketApi extension 2020-12-15 10:58:56 +01:00
Hannah von Reth
e97784bb9d
Don't use mutable lambdas as they hide where we modify work on a copy 2020-12-15 10:58:55 +01:00
Hannah von Reth
0f92713ce5
AccountSettings: Use switch, case to ensure we handle all cases 2020-12-15 10:58:55 +01:00
Christian Kamm
bade7aedc6
Checksums: Add back QIODevice api
Because the winvfs plugin needs it. But be more careful about the
device's lifetime this time.
2020-12-15 10:58:55 +01:00
Christian Kamm
18e1098e38
Remove maxLogLines config option
It's no longer used.

For owncloud/docs#1365
2020-12-15 10:58:55 +01:00
Christian Kamm
ea829f96ca
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.

For #7372
2020-12-15 10:58:55 +01:00
Christian Kamm
8a5a185752
Fix 'unused parameter name' warnings 2020-12-15 10:58:55 +01:00
Christian Kamm
c9dbe46542
Checksums: Fix crash due to threading issue
The checksum computation thread was potentially using a QFile that was
deleted in the gui thread.

For #7368
2020-12-15 10:58:54 +01:00
Christian Kamm
a587cd3a13
AccountSettings: Fetch subitems after wiping them
That helps avoid empty lists after account creation #7336
2020-12-15 10:58:54 +01:00
Christian Kamm
5761f4cd8a
SyncEngine: Don't duplicate fatal errors
Previously fatal error texts were duplicated: Once they entered the
SyncResult via the SyncFileItem and once via syncError().

syncError is intended for folder-wide sync issues that are not pinned
to particular files. Thus that duplicated path is removed.

For #5088
2020-12-15 10:58:54 +01:00
Christian Kamm
61972c35a8
Discovery: Parse etag to be consistent with RequestEtagJob
This avoids unnecessary sync runs.

For #7345
2020-12-15 10:58:54 +01:00
Christian Kamm
38c466efbf
Vfs: Require local discovery after disabling vfs
Without it local files aren't guaranteed to be downloaded #6936.
2020-12-15 10:58:54 +01:00
Christian Kamm
55ee3f440b
Vfs: Remove old db record when dehydrating via rename
For #7338
2020-12-15 10:58:54 +01:00
Christian Kamm
e6990bd04e
Vfs: Make move detection work with virtual files #7001
Previously a checksum computation could be done on a suffix-placeholder
file, making discovery believe that no move took place.
2020-12-15 10:58:54 +01:00
Christian Kamm
00dcf3ef59
Vfs: Ensure pins change with (de-)hydration
Previously an implicit hydration of a file in an online-only folder
would not change the pin state and cause a dehydration on the next
sync.
2020-12-15 10:58:53 +01:00
Christian Kamm
0df3b83bd2
Vfs: Add hook to allow update-metadata for unchanged files
Allows winvfs to convert files to placeholders when vfs is enabled. This
is required to mark files as in-sync #7329.
2020-12-15 10:58:53 +01:00
Christian Kamm
b34df4413b
Vfs: Improve strings for availability states 2020-12-15 10:58:53 +01:00
Christian Kamm
5bc2180478
Vfs: Preserve pin state on hydration
For #7322 and #7323
2020-12-15 10:58:53 +01:00
Christian Kamm
fc52c5d0cd
Vfs: Retain existing data when enabling vfs #7302
Previously all local data was deleted because the root folder was marked
as OnlineOnly.
2020-12-15 10:58:53 +01:00
Dominik Schmidt
92f6d866e1
Add missing OWNCLOUDSYNC_EXPORT 2020-12-15 10:58:52 +01:00
Christian Kamm
eb58352286
Vfs: Make test pass with different suffix #7279 2020-12-15 10:58:52 +01:00
Christian Kamm
5acb157a7e
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.
2020-12-15 10:58:52 +01:00
Christian Kamm
0e9f030b0f
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
2020-12-15 10:58:52 +01:00
Christian Kamm
69fa1e4775
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.
2020-12-15 10:58:52 +01:00