• S
    Validate CF Options when creating a new column family (#5453) · f1219644
    Sagar Vemuri 提交于
    Summary:
    It seems like CF Options are not properly validated  when creating a new column family with `CreateColumnFamily` API; only a selected few checks are done. Calling `ColumnFamilyData::ValidateOptions`, which is the single source for all CFOptions validations,  will help fix this. (`ColumnFamilyData::ValidateOptions` is already called at the time of `DB::Open`).
    
    **Test Plan:**
    Added a new test: `DBTest.CreateColumnFamilyShouldFailOnIncompatibleOptions`
    ```
    TEST_TMPDIR=/dev/shm ./db_test --gtest_filter=DBTest.CreateColumnFamilyShouldFailOnIncompatibleOptions
    ```
    Also ran gtest-parallel to make sure the new test is not flaky.
    ```
    TEST_TMPDIR=/dev/shm ~/gtest-parallel/gtest-parallel ./db_test --gtest_filter=DBTest.CreateColumnFamilyShouldFailOnIncompatibleOptions --repeat=10000
    [10000/10000] DBTest.CreateColumnFamilyShouldFailOnIncompatibleOptions (15 ms)
    ```
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/5453
    
    Differential Revision: D15816851
    
    Pulled By: sagar0
    
    fbshipit-source-id: 9e702b9850f5c4a7e0ef8d39e1e6f9b81e7fe1e5
    f1219644
可在Tags中查看这些版本中当前仓库的状态.
HISTORY.md 80.4 KB