• Y
    Handle file boundaries when timestamps should not be persisted (#11578) · f7452634
    Yu Zhang 提交于
    Summary:
    Handle file boundaries `FileMetaData.smallest`, `FileMetaData.largest` for when `persist_user_defined_timestamps` is false:
        1) on the manifest write path, the original user-defined timestamps in file boundaries are stripped. This stripping is done during `VersionEdit::Encode` to limit the effect of the stripping to only the persisted version of the file boundaries.
        2) on the manifest read path during DB open, a a min timestamp is padded to the file boundaries. Ideally, this padding should happen during `VersionEdit::Decode` so that all in memory file boundaries have a compatible user key format as the running user comparator. However, because the user-defined timestamp size information is not available at that time. This change is added to `VersionEditHandler::OnNonCfOperation`.
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/11578
    
    Test Plan:
    ```
    make all check
    ./version_edit_test --gtest_filter="*EncodeDecodeNewFile4HandleFileBoundary*".
    ./db_with_timestamp_basic_test --gtest_filter="*HandleFileBoundariesTest*"
    ```
    
    Reviewed By: pdillinger
    
    Differential Revision: D47309399
    
    Pulled By: jowlyzhang
    
    fbshipit-source-id: 21b4d54d2089a62826b31d779094a39cb2bbbd51
    f7452634
version_set_test.cc 130.3 KB