Skip to content

implement gather #211

Description

@ThomasWaldmann

Kind of https://en.wikipedia.org/wiki/Gather/scatter_(vector_addressing), but in borgstore context:

If an application (e.g. borg) needs just some pieces from a store object, it can do partial loads already.

If it needs multiple pieces from a store object, that means multiple partial loads and multiple roundtrips.

If a piece is only small and the roundtrip takes long due to connection latency, this is rather slow.

We could offer a gather method that takes the same kind of data structure as defrag as input, then gathers all the pieces from the object(s) and returns them to the caller.

The caller knows the sizes of the requested pieces, so they can split the returned data to get the individual pieces (or use memoryview).

Implementation notes:

  • similar as defrag method, could likely reuse most of the code
  • backend base class method that works everywhere
  • rest backend overrides the method and just talks to the rest server to do it
  • rest server calls the gather method of its backend

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions