Revision c384c08a4f699ded6d4e7e66432e464abc88eff4 authored by Ziyue Yang on 12 May 2020, 16:25:21 UTC, committed by Facebook GitHub Bot on 12 May 2020, 16:27:35 UTC
Summary:
Currently there is no check for whether BlockBasedTableBuilder will expose
compression error status if compression fails during the table building.
This commit adds fake faulting compressors and a unit test to test such
cases.

This check finds 5 bugs, and this commit also fixes them:

1. Not handling compression failure well in
   BlockBasedTableBuilder::BGWorkWriteRawBlock.
2. verify_compression failing in BlockBasedTableBuilder when used with ZSTD.
3. Wrongly passing the same reference of block contents to
   BlockBasedTableBuilder::CompressAndVerifyBlock in parallel compression.
4. Wrongly setting block_rep->first_key_in_next_block to nullptr in
   BlockBasedTableBuilder::EnterUnbuffered when there are still incoming data
   blocks.
5. Not maintaining variables for compression ratio estimation and first_block
   in BlockBasedTableBuilder::EnterUnbuffered.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6709

Reviewed By: ajkr

Differential Revision: D21236254

fbshipit-source-id: 101f6e62b2bac2b7be72be198adf93cd32a1ff46
1 parent 3f21807
History
File Mode Size
cf_options.cc -rw-r--r-- 36.4 KB
cf_options.h -rw-r--r-- 9.1 KB
db_options.cc -rw-r--r-- 36.4 KB
db_options.h -rw-r--r-- 3.6 KB
options.cc -rw-r--r-- 26.2 KB
options_helper.cc -rw-r--r-- 58.2 KB
options_helper.h -rw-r--r-- 6.1 KB
options_parser.cc -rw-r--r-- 26.6 KB
options_parser.h -rw-r--r-- 5.3 KB
options_settable_test.cc -rw-r--r-- 24.6 KB
options_test.cc -rw-r--r-- 139.0 KB
options_type.h -rw-r--r-- 14.6 KB

back to top