• L
    BlobDB GC: add SST <-> oldest blob file referenced mapping (#5903) · 5f025ea8
    Levi Tamasi 提交于
    Summary:
    This is groundwork for adding garbage collection support to BlobDB. The
    patch adds logic that keeps track of the oldest blob file referred to by
    each SST file. The oldest blob file is identified during flush/
    compaction (similarly to how the range of keys covered by the SST is
    identified), and persisted in the manifest as a custom field of the new
    file edit record. Blob indexes with TTL are ignored for the purposes of
    identifying the oldest blob file (since such blob files are cleaned up by the
    TTL logic in BlobDB).
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/5903
    
    Test Plan:
    Added new unit tests; also ran db_bench in BlobDB mode, inspected the
    manifest using ldb, and confirmed (by scanning the SST files using
    sst_dump) that the value of the oldest blob file number field matches
    the contents of the file for each SST.
    
    Differential Revision: D17859997
    
    Pulled By: ltamasi
    
    fbshipit-source-id: 21662c137c6259a6af70446faaf3a9912c550e90
    5f025ea8
builder.cc 10.4 KB