Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of delta-sync support on server-side. #29404

Merged
merged 1 commit into from
Mar 12, 2018

Commits on Jan 20, 2018

  1. This commit adds the required server-side support for delta-sync.

    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 owncloud#16162.
    ahmedammar committed Jan 20, 2018
    Configuration menu
    Copy the full SHA
    0e0ab09 View commit details
    Browse the repository at this point in the history