• L
    Add blob support to DBIter (#7731) · 61932cdf
    Levi Tamasi 提交于
    Summary:
    The patch adds iterator support to the integrated BlobDB implementation.
    Whenever a blob reference is encountered during iteration, the corresponding
    blob is retrieved by calling `Version::GetBlob`, assuming the `expose_blob_index`
    (formerly `allow_blob`) flag is *not* set. (Note: the flag is set by the old stacked
    BlobDB implementation, which has its own blob file handling/blob retrieval logic.)
    
    In addition, `DBIter` now uniformly returns `Status::NotSupported` with the error
    message `"BlobDB does not support merge operator."` when encountering a
    blob reference while performing a merge (instead of potentially returning a
    message that implies the database should be opened using the stacked BlobDB's
    `Open`.)
    
    TODO: We can implement support for lazily retrieving the blob value (or in other
    words, bypassing the retrieval of blob values based on key) by extending the `Iterator`
    API with a new `PrepareValue` method (similarly to `InternalIterator`, which already
    supports lazy values).
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/7731
    
    Test Plan: `make check`
    
    Reviewed By: riversand963
    
    Differential Revision: D25256293
    
    Pulled By: ltamasi
    
    fbshipit-source-id: c39cd782011495a526cdff99c16f5fca400c4811
    61932cdf
db_iter.cc 50.5 KB