1
0
Fork 0
Commit Graph

228 Commits

Author SHA1 Message Date
Markus Goetz d78c3679e7 Propagator: Pump in more requests if we think current ones are quick
Helps with small file sync #331
When I benchmarked this, it went up to 6 parallelism and
was about 1/3 faster than the previous fixed 3 parallelism.
Doing more than 6 is dangerous because QNAM limits to 6 TCP
connections and also the server might become a bottleneck.

Should also help for #4081
2016-03-02 15:22:21 +01:00
Christian Kamm d6d3502960 Checksums: Compute content checksum on download #4375 2016-03-02 14:28:41 +01:00
ckamm ffa78b99d9 Merge pull request #4512 from owncloud/add-checksum-to-database
Checksums: keep the transfer checksum in the database as the content …
2016-03-02 14:04:37 +01:00
Christian Kamm a9b00a7489 Don't make files read-only when server is too old #4450 2016-03-01 10:11:20 +01:00
Olivier Goffart e6f81d3965 Checksums: keep the transfer checksum in the database as the content checksum
Currently, we only use this for .eml files. But we can just store this checksum
in the database if it was computed anyway.

Issue #4487
2016-02-25 17:17:14 +01:00
Olivier Goffart 60c101d90b PropagatorDownload: fix possible crash
Backtrace seen from the crash reporter where reply() is null.
2016-02-24 19:52:14 +01:00
Christian Kamm abf5a5ad1e Propagation: Fix dir <-> file changes propagating to server #4302
* Ensure every time a file becomes a directory or the other way around
  the item is flagged as INSTRUCTION_TYPE_CHANGE.
* Delete the badly-typed entity if necessary in the propagation jobs.
2016-01-08 05:38:08 +01:00
Christian Kamm 2662203fb7 Windows: Fix deleting and replacing of read-only files #4308 2016-01-05 13:15:59 +01:00
Christian Kamm d4edab02b0 Propagator: Deal with directories becoming files #4302
Note, in particular the revised order of directory deletion jobs.
2016-01-05 10:26:41 +01:00
Christian Kamm 6cf5fc7f7d Permissions: Keep more user permissions
t4.pl discovered that it'd needlessly override permissions sometimes
2015-11-23 13:24:05 +01:00
Christian Kamm 10db6cee6c Rename files 2015-11-23 12:09:25 +01:00
Christian Kamm a25f094c4c Checksums: Don't reupload if size and checksum are unchanged #3235
* Compute the content checksum (in addition to the optional
  transmission checksum) during upload (.eml files only)

* Add hook to compute and compare the checksum in csync_update

* Add content checksum to database, remove transmission checksum
2015-11-23 11:59:56 +01:00
Christian Kamm 175ad6fb77 Reflect read-only permissions in filesystem #3244 2015-11-10 10:14:25 +01:00
ckamm 251679253a Merge pull request #3951 from ckamm/checksum
Checksums stored in database #3735
2015-10-29 10:40:24 +01:00
Christian Kamm 9788055147 Propagator: Add blacklisting of disk space errors #2939 2015-10-29 09:36:59 +01:00
Christian Kamm b7823dc648 Checksum: Put checksum type into separate column #3735 2015-10-28 14:46:20 +01:00
Christian Kamm f1b500d3e0 Checksum: Add env variables to disable #3735 2015-10-28 09:56:39 +01:00
Christian Kamm b1387f801b Propagate: On download store checksum header in db #3735 2015-10-28 09:56:39 +01:00
Christian Kamm 0354289795 Checksums: Improvement in async computation and validation #3735 2015-10-28 09:56:39 +01:00
Olivier Goffart dccf4e9c34 Download: Soft errors for error while resuming (#4000) 2015-10-26 12:31:07 +01:00
Phil Davis f0e17fd9c0 libtypos comment and message typos for master 2015-10-05 09:05:09 +05:45
Christian Kamm 24c41ed0da Propagation: Try another sync on 423 Locked #3387 2015-10-01 13:05:07 +02:00
Christian Kamm 36e8e9ebf5 Propagator: Download disk space checks #2939
* There's a critical 50 MB threshold under which syncs abort
  (OWNCLOUD_CRITICAL_FREE_SPACE)
* The sync client always keeps 250 MB free
  (OWNCLOUD_FREE_SPACE)
2015-10-01 12:59:05 +02:00
Markus Goetz 7fc7925d17 Propagator: Don't corrupt file with broken webserver #3373 2015-07-30 14:40:24 +02:00
Markus Goetz f01b7bb5db Propagator: More debug output for downloads/uploads 2015-07-30 14:40:24 +02:00
Markus Goetz ef1e6add4f Settings: Auto download bandwidth limit #1485 2015-06-29 17:43:25 +02:00
Christian Kamm 28d6d0dc1e Download: Gracefully skip files with 404. #2227 2015-06-17 12:24:21 +02:00
Olivier Goffart 54a42e401b More compilation fixes after the merge 2015-05-26 12:33:19 +02:00
Olivier Goffart 6b27d2e703 Merge remote-tracking branch 'origin/1.8' 2015-05-26 12:28:31 +02:00
Olivier Goffart 6b9e123816 Merge remote-tracking branch 'origin/checksum_1.8' into 1.8 2015-05-22 10:32:37 +02:00
Olivier Goffart fb2295fcec Merge branch 'recall' into 1.8 2015-05-22 10:32:26 +02:00
Christian Kamm 1c84d01584 Windows: Fix build of tests. 2015-05-22 09:17:24 +02:00
Olivier Goffart 3fcce08a22 recall: move the recall code in a namespace 2015-05-21 16:23:54 +02:00
Olivier Goffart 289800c1ba Recall: make it work even if it is not in the root directory 2015-05-21 16:06:53 +02:00
Olivier Goffart 9a02a0f3a8 Recall feature: Fix some style issues 2015-05-21 16:06:52 +02:00
Jakub Moscicki 4e79093f84 recall file prototype 2015-05-21 16:06:52 +02:00
Klaas Freitag 8f277e46d6 TransmissionChecksumming: Remove SyncFileItem dependency. 2015-05-21 15:51:48 +02:00
Klaas Freitag dec3bd4a02 Some more minor cleanups based on the pull request review. 2015-05-20 22:44:12 +02:00
Klaas Freitag 5b5a636cc1 Make TransmissionChecksumValidator child of the job for auto delete.
That way no explicit memory management is needed as the allocation
is freed when the job (parent) is deleted automatically.
2015-05-20 16:54:04 +02:00
Klaas Freitag c7f759fedf Propagator: Use the TransmissionChecksumValidator class. 2015-05-19 17:09:40 +02:00
Klaas Freitag f016d25b4c Propagate downloads: Handle checksum transmission header.
Read a checksum from the HTTP header, and if its there, compare the
downloaded tmp file against it. In case of corruption, schedule a
redownload.
2015-05-19 17:09:40 +02:00
Markus Goetz 08184d07cf Merge branch '1.9' 2015-05-12 23:03:45 +02:00
Markus Goetz cdfafa2180 Propagator: Mention name of conflict file (for debugging) 2015-05-12 17:11:21 +02:00
Jocelyn Turcotte ea39e457f5 Fix the build 2015-05-12 10:35:57 +02:00
Daniel Molkentin b54f2b3b31 Merge remote-tracking branch 'origin/1.9'
Conflicts:
	VERSION.cmake
	src/libsync/propagatedownload.cpp
	src/libsync/propagateupload.cpp
2015-05-12 10:03:38 +02:00
Markus Goetz 625e61516f Propagator: Limit length of temporary file name #2789 (fixup)
Fix 22c35c4d15
2015-05-11 15:42:35 +02:00
Markus Goetz 22c35c4d15 Propagator: Limit length of temporary file name #2789 2015-05-08 16:42:03 +02:00
Christian Kamm 79ac61684c Propagator: Overwrite local data only if unchanged. #3156 2015-05-07 14:43:33 +02:00
Olivier Goffart ddfb7f3b7a Merge remote-tracking branch 'origin/1.8' 2015-04-27 12:20:11 +02:00
Christian Kamm 7c1281dd06 Windows: Fix rename of finished file. #3073
The file was still open and therefore couldn't be renamed...
2015-04-22 14:46:04 +02:00
Jocelyn Turcotte 12d7484b85 Pass SyncFileItems by pointer instead of by value
Use a QSharedPointer to keep the same ownership and
continue passing the SyncFileItems as a const& when
ownership isn't taken. This allows sharing the same
allocations between the jobs and the result vectors.

This saves about 20MB of memory (off 120MB) once all
jobs are created.
2015-04-18 14:26:40 +02:00
Olivier Goffart 458f336405 PropagateDownload: Read the mtime from the file system after writing it
Because file system like FAT only have two second accuracy and would result
in a upload if the mtime in the database is not the same as the one that was
downloaded

Issue #3103
2015-04-15 15:50:20 +02:00
Markus Goetz ef89582d7e Propagator: Fix compile 2015-03-30 08:41:53 +02:00
Markus Goetz 06a2f58c51 Propagator: Introduce custom property to make error soft
This can be set by a custom credential QNAM.
2015-03-17 23:31:30 +01:00
Christian Kamm efe9f1b442 Lnk: Work around QFile::rename() #2792
QFile::rename() fails if the source file is a shortcut to a file
or directory that does not exist.
2015-03-11 12:29:33 +01:00
Markus Goetz 668de9bf31 Propagate: Don't retry direct download on abort 2015-03-05 21:56:39 +01:00
Klaas Freitag 05624e3fc8 FileSystem: Remove QFileInfo based implementations.
QFileInfo has to be refreshed if the underlying file has been
modified in between. That is dangerous so ckamm and me decided
to eliminate the QFileInfo based implementations.

This was triggered by a bug that the client uploaded files that
it should not have.
2015-02-27 15:27:49 +01:00
Olivier Goffart d8b6e00fe7 Propagator: Let network propagator job understand a new header OC-ErrorString
This allows the server to send a readable error string in many cases
2015-02-26 15:53:09 +01:00
Christian Kamm f88398e776 lnk files: Fix exists() calls. #2792 2015-02-25 11:50:32 +01:00
Christian Kamm 9ba88f6baf Windows: Sync .lnk files correctly. #2792 2015-02-12 11:27:58 +01:00
Olivier Goffart 5ec793e045 propagateupload: Save the mtime given by the server in the reply to GET
There could be a race condition if the file was updated on the server
between the discovery and the propagate phase. By taking the mtime from
the server, we make sure that we do not have a race.

This is tested by t6.pl with BIG3.file because the script was modifying
the file between the two phases
2015-02-06 10:23:20 +01:00
Klaas Freitag 40c802b148 Download: Handle locking problems as soft errors, enterprise #455 2015-01-15 20:51:30 +01:00
Olivier Goffart 22ad34fa0e Merge branch '1.7'
Conflicts:
	admin/win/nsi/l10n/French.nsh
	src/mirall/propagator_qnam.cpp
2015-01-15 17:58:43 +01:00
Daniel Molkentin c3468b7ed6 Merge remote-tracking branch 'origin/master' into accountstate
Conflicts:
	src/gui/owncloudsetupwizard.cpp
	src/gui/owncloudsetupwizard.h
	src/libsync/propagatedownload.cpp
	src/libsync/propagatedownload.h
2015-01-08 15:33:39 +01:00
Christian Kamm 38ebfec1fb Use global Account/AccountState less.
* Use a shared pointer to Account everywhere to ensure
  the instance stays alive long enough for a sync to terminate
* Folder is now tied to an AccountState
* SyncEngine and OwncloudPropagator tie to an Account and use that
  for all jobs they run

Issue: Since the setup wizard currently always replaces the
account, it will always wipe all folder definitions, even when
the actual changes to the account were minor.
2014-12-18 15:39:51 +01:00
Olivier Goffart e8efaa5ed8 Direct download URL: Fix resuming
The server might support resuming, so don't always erase the temporary file
and pass the startSize, so the temporary file will be remove if the server
does not support it after all (because it is not sending the "bytes" header

Also pass the expected etag for consistency even if it's not used in this case.
2014-12-18 12:13:12 +01:00
Olivier Goffart 96872e2b3b Download: When direct URL don't work, retry through webdav 2014-12-17 14:28:13 +01:00
Olivier Goffart b1d392e415 Download job: allow redirect on direct download link
Issue #2614
2014-12-16 11:51:25 +01:00
Christian Kamm 53d5de685c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/gui/folder.cpp
	src/gui/folder.h
	src/libsync/networkjobs.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagatedownload.cpp
2014-12-10 13:01:36 +01:00
Daniel Molkentin 3016844dd7 Merge branch 'master' into rename_client
Conflicts:
	README.md
	src/gui/folderman.cpp
	src/gui/settingsdialog.cpp
	src/libsync/accessmanager.cpp
	src/libsync/propagateupload.h
2014-12-02 13:37:22 +01:00
Olivier Goffart fb3f5d86cf Fix compilation after merge 2014-12-01 14:41:39 +01:00
Olivier Goffart 512492bf30 Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/libsync/propagatedownload.cpp
2014-12-01 14:37:47 +01:00
Olivier Goffart 1c58b75ac2 Merge branch '1.7' 2014-11-21 11:08:20 +01:00
Christian Kamm 0fe7a69b39 FolderWatcher: Detect own changes. #2297 2014-11-20 13:16:29 +01:00
Olivier Goffart 1113980b20 Propagator: Change the scheduler
It still needs to be a bit optimized, but it allows to paralelized jobs between directories

(this is required to paralelize the mkcol)
2014-11-18 17:35:31 +01:00
Daniel Molkentin 281c0e1553 Merge branch 'master' into rename_client
Conflicts:
	CMakeLists.txt
	src/gui/main.cpp
	src/libsync/accessmanager.cpp
	src/libsync/accessmanager.h
	src/libsync/owncloudpropagator_p.h
2014-11-12 00:07:59 +01:00
Olivier Goffart 134650eb44 Parallel DELETE 2014-11-11 13:19:29 +01:00
Olivier Goffart 506ba022f1 Split propagator_qnam.cpp into propagateupload.cpp and propagatedownload.cpp 2014-11-11 12:17:10 +01:00