Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmed Ammar <ahmed.a.ammar@gmail.com>2017-11-15 17:16:19 +0300
committerAhmed Ammar <ahmed.a.ammar@gmail.com>2018-01-15 18:34:57 +0300
commit12aeb890c9a6ad329e3612ebb96d843d70e413c9 (patch)
treed0085916974417eb2a2415e255dd818939ff4acf /src/libsync/bandwidthmanager.h
parent95861212f8977f0e4fd6990b49e25c9805d5ecac (diff)
Implementation of delta-sync support on client-side.
This commit adds client-side support for delta-sync, this adds a new 3rdparty submodule `gh:ahmedammar/zsync`. This zsync tree is a modified version of upstream, adding some needed support for the upload path and other requirements. If the server does not announce the required zsync capability then a full upload/download is fallen back to. Delta synchronization can be enabled/disabled using command line, config, or gui options. On both upload and download paths, a check is made for the existance of a zsync metadata file on the server for a given path. This is provided by a dav property called `zsync`, found during discovery phase. If it doesn't exist the code reverts back to a complete upload or download, i.e. previous implementations. In the case of upload, a new zsync metadata file will be uploaded as part of the chunked upload and future synchronizations will be delta-sync capable. Chunked uploads no longer use sequential file names for each chunk id, instead, they are named as the byte offset into the remote file, this is a minimally intrusive modification to allow fo delta-sync and legacy code paths to run seamlessly. A new http header OC-Total-File-Length is sent, which informs the server of the final expected size of the file not just the total transmitted bytes as reported by OC-Total-Length. The seeding and generation of the zsync metadata file is done in a separate thread since this is a cpu intensive task, ensuring main thread is not blocked. This commit closes owncloud/client#179.
Diffstat (limited to 'src/libsync/bandwidthmanager.h')
-rw-r--r--src/libsync/bandwidthmanager.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsync/bandwidthmanager.h b/src/libsync/bandwidthmanager.h
index 691e11162..33a3cdece 100644
--- a/src/libsync/bandwidthmanager.h
+++ b/src/libsync/bandwidthmanager.h
@@ -23,7 +23,7 @@
namespace OCC {
class UploadDevice;
-class GETFileJob;
+class GETJob;
class OwncloudPropagator;
/**
@@ -47,7 +47,7 @@ public slots:
void registerUploadDevice(UploadDevice *);
void unregisterUploadDevice(QObject *);
- void registerDownloadJob(GETFileJob *);
+ void registerDownloadJob(GETJob *);
void unregisterDownloadJob(QObject *);
void absoluteLimitTimerExpired();
@@ -86,14 +86,14 @@ private:
qint64 _relativeUploadLimitProgressAtMeasuringRestart;
qint64 _currentUploadLimit;
- QLinkedList<GETFileJob *> _downloadJobList;
+ QLinkedList<GETJob *> _downloadJobList;
QTimer _relativeDownloadMeasuringTimer;
// for relative bw limiting, we need to wait this amount before measuring again
QTimer _relativeDownloadDelayTimer;
// the device measured
- GETFileJob *_relativeLimitCurrentMeasuredJob;
+ GETJob *_relativeLimitCurrentMeasuredJob;
// for measuring how much progress we made at start
qint64 _relativeDownloadLimitProgressAtMeasuringRestart;