[stable10] This commit adds the required server-side support for delta-sync. - #35011
Closed
PVince81 wants to merge 1 commit into
Closed
[stable10] This commit adds the required server-side support for delta-sync.#35011PVince81 wants to merge 1 commit into
PVince81 wants to merge 1 commit into
Conversation
The basic approach is to store zsync metadata files in a folder called `files_zsync/` which stores them based on fileid. These metadata files can be requested by the client via a new route `dav/files/$user/$path?zsync`. They can also be deleted using the same route. This is implemented using a new `ServerPlugin` called `ZsyncPlugin`. Filesystem hooks are used to mirror any `copy/delete` operation on the base file or containing folders onto the metadata files. To ensure any changes server-side changes are will not produce out-of-sync metadata. The upload path is implemented by creating a new plugin `ChunkingPluginZsync`. The chunk file ids are now assumed to be named as the offsets into the original file. Special handling is done when a chunk named `.zsync` is found which is the generated client-side metadata. This means copying the contents to the `files_zsync/` folder. The core reason behind this is to ensure that both the metadata and the file are put in place atomically, as part of the final `MOVE` request. The implemenation adds a new class `AssemblyStreamZsync` which extends `AssemblyStream` with additional support to fill in the data between chunk offsets from a `backingFile`. A new `zsync` capability is added to the dav app, which can be checked by the client to know if delta-sync is supported or not. A zsync dav property is also returned for files which have metadata on the server. This commit closes #16162.
mrow4a
reviewed
Apr 13, 2019
|
|
||
| public function __construct(View $view) { | ||
| $this->view = $view; | ||
| $this->view->mkdir('files_zsync'); |
Contributor
There was a problem hiding this comment.
@PVince81 @DeepDiver1975 we have to find another way. This is invasive operation, and should be lazy.
Contributor
There was a problem hiding this comment.
Note that this is a backport, not the original PR.
mrow4a
suggested changes
Apr 13, 2019
mrow4a
left a comment
Contributor
There was a problem hiding this comment.
Lets fix that mkdir issue. Lets maybe disable it by default, (informing this is experimental feature?)
Contributor
|
It's already behind a [x] switch in the client, so I'd say you can keep it ON in the server since clients control if they want to use it? |
Contributor
|
@guruz this is exactly the problem... This |
Closed
Contributor
|
Just curious about this one :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #29404 to stable10.
Should we add a config switch to disable the feature ?