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

[DNM] storage: introduce SST snapshot strategy #25134

Commits on Apr 27, 2018

  1. c-deps: pull in rocksdb range deletion ingestion change

    facebook/rocksdb#3778 adds a DeleteRange method
    to SstFileWriter and adds support for ingesting SSTs with range deletion
    tombstones.
    
    facebook/rocksdb#3779 adds a virtual Truncate method
    to Env, which truncates the named file to the specified size.
    
    Release note: None
    nvanbenschoten committed Apr 27, 2018
    Configuration menu
    Copy the full SHA
    2bd6f5d View commit details
    Browse the repository at this point in the history
  2. engine: implement engine.Writer interface on RocksDBSstFileWriter

    This change adds the `Merge`, `Clear`, and `ClearRange` methods to
    `RocksDBSstFileWriter`. In doing so, it makes the type implement the
    `engine.Writer` interface.
    
    Release note: None
    nvanbenschoten committed Apr 27, 2018
    Configuration menu
    Copy the full SHA
    ea37a5c View commit details
    Browse the repository at this point in the history
  3. engine: add Truncate method to RocksDBSstFileWriter

    This change adds a `Truncate` method to `RocksDBSstFileWriter`. This
    method truncates the current SST file and returns the data that was
    deleted. This can be used to chunk the SST into pieces. Because SSTs
    are built in an append-only manner, this is safe and the sum of the
    resulting chunks is equivalent to an SST built without ever calling
    `Truncate`.
    
    Release note: None
    nvanbenschoten committed Apr 27, 2018
    Configuration menu
    Copy the full SHA
    8a94f29 View commit details
    Browse the repository at this point in the history
  4. storage: include snapshotStrategy directly in IncomingSnapshot

    Instead of decomposing the results of a received snapshot and inserting
    each separate piece of state into an `IncomingSnapshot`, we now store
    this state directly on each `snapshotStrategy`. The `snapshotStrategy`
    is then attached to a `IncomingSnapshot`. This makes more sense, because
    the state is specific to the snapshotStrategy, and different strategies
    will receive different types of data in different representations.
    
    Release note: None
    nvanbenschoten committed Apr 27, 2018
    Configuration menu
    Copy the full SHA
    46e4abb View commit details
    Browse the repository at this point in the history
  5. [DNM] storage: introduce SST snapshot strategy

    Fixes cockroachdb#16954.
    Related to cockroachdb#25047.
    
    This depends on the following two upstream changes to RockDB:
    - facebook/rocksdb#3778
    - facebook/rocksdb#3779
    
    The change introduces a new snapshot strategy called "SST". This strategy
    stream sst files consisting of all keys in a range from the sender to the
    receiver. These sst files are then atomically ingested directly into RocksDB.
    An important property of the strategy is that the amount of memory required
    for a receiver using the strategy is constant with respect to the size of
    a range, instead of linear as it is with the KV_BATCH strategy. This will
    be critical for increasing the default range size and potentially for
    increasing the number of concurrent snapshots allowed per node. The
    strategy also seems to significantly speed up snapshots once ranges are
    above a certain size (somewhere in the single digit MBs).
    
    This is a WIP change. Before it can be merged it needs:
    - to be cleaned up a bit
    - more testing (unit test, testing knobs, maybe some chaos)
    - proper version handling
    - heuristic tuning
    - decisions on questions like compactions after ingestion
    
    Release note: None
    nvanbenschoten committed Apr 27, 2018
    Configuration menu
    Copy the full SHA
    2881a8f View commit details
    Browse the repository at this point in the history