• Levi Tamasi's avatar
    Maintain the set of linked SSTs in BlobFileMetaData (#6945) · 83833637
    Levi Tamasi 创作于
    Summary:
    The `FileMetaData` objects associated with table files already contain the
    number of the oldest blob file referenced by the SST in question. This patch
    adds the inverse mapping to `BlobFileMetaData`, namely the set of table file
    numbers for which the oldest blob file link points to the given blob file (these
    are referred to as *linked SSTs*). This mapping will be used by the GC logic.
    
    Implementation-wise, the patch builds on the `BlobFileMetaDataDelta`
    functionality introduced in https://github.com/facebook/rocksdb/pull/6835: newly linked/unlinked SSTs are
    accumulated in `BlobFileMetaDataDelta`, and the changes to the linked SST set
    are applied in one shot when the new `Version` is saved. The patch also reworks
    the blob file related consistency checks in `VersionBuilder` so they validate the
    consistency of the forward table file -> blob file links and the backward blob file ->
    table file links for blob files that are part of the `Version`.
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/6945
    
    Test Plan: `make check`
    
    Reviewed By: riversand963
    
    Differential Revision: D21912228
    
    Pulled By: ltamasi
    
    fbshipit-source-id: c5bc7acf6e729a8fccbb12672dd5cd00f6f000f8
    83833637