• A
    Added compaction read errors to `db_stress` (#11789) · 392d6957
    Andrew Kryczka 提交于
    Summary:
    - Fixed misspellings of "inject"
    - Made user read errors retryable when `FLAGS_inject_error_severity == 1`
    - Added compaction read errors when `FLAGS_read_fault_one_in > 0`. These are always retryable so that the DB will keep accepting writes
    - Reenabled setting `compaction_readahead_size` in crash test. The reason for disabling it was to "keep the test clean", which is not a good enough reason to skip testing it
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/11789
    
    Test Plan:
    With https://github.com/facebook/rocksdb/issues/11782 reverted, reproduced the bug:
    - Build: `make -j56 db_stress`
    - Command: `TEST_TMPDIR=/dev/shm python3 tools/db_crashtest.py blackbox --simple --write_buffer_size=524288 --target_file_size_base=524288 --max_bytes_for_level_base=2097152 --interval=10 --max_key=1000000`
    - Output:
    ```
    stderr has error message:
    ***put or merge error: Corruption: Compaction number of input keys does not match number of keys processed.***
    ```
    
    Reviewed By: cbi42
    
    Differential Revision: D48939994
    
    Pulled By: ajkr
    
    fbshipit-source-id: a1efb799efecdfd5d9cfd185e4a6321db8fccfbb
    392d6957
fault_injection_fs.h 21.1 KB