rocksdb/table
Aaron Gao db74b1a219 fix bug in merge_iterator when data race happens
Summary:
core dump when run
`./db_stress --max_background_compactions=1 --max_write_buffer_number=3 --sync=0 --reopen=20 --write_buffer_size=33554432 --delpercent=5 --log2_keys_per_lock=10 --block_size=16384 --allow_concurrent_memtable_write=1 --test_batches_snapshots=0 --max_bytes_for_level_base=67108864 --progress_reports=0 --mmap_read=1 --kill_prefix_blacklist=WritableFileWriter::Append,WritableFileWriter::WriteBuffered --writepercent=35 --disable_data_sync=0 --readpercent=50 --subcompactions=3 --ops_per_thread=20000000 --memtablerep=skip_list --prefix_size=0 --target_file_size_multiplier=1 --column_families=1 --db=/dev/shm/rocksdb/rocksdb_crashtest_whitebox --threads=32 --disable_wal=0 --open_files=500000 --destroy_db_initially=0 --target_file_size_base=16777216 --nooverwritepercent=1 --iterpercent=10 --max_key=100000000 --prefixpercent=0 --use_clock_cache=false --kill_random_test=189 --cache_size=1048576 --verify_checksum=1`
Actually the relevant flag is `--threads`, data race when --thread > 1 cause problem.
It is possible that multiple
threads read/write memtable simultaneously. After one thread
calls Prev(), another thread may insert a new key just between
the current key and the key next, which may cause the
assert(current_ == CurrentForward()) failure when the first
thread calls Next() again if in prefix seek mode

Test Plan: rerun db_stress with >1 thread / make all check -j64

Reviewers: sdong, andrewkr, IslamAbdelRahman

Reviewed By: IslamAbdelRahman

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D62979
2016-08-30 22:19:42 -07:00
..
adaptive_table_factory.cc Only cache level 0 indexes and filter when opening table reader 2016-07-20 11:23:31 -07:00
adaptive_table_factory.h Only cache level 0 indexes and filter when opening table reader 2016-07-20 11:23:31 -07:00
block_based_filter_block_test.cc Add statistics field to show total size of index and filter blocks in block cache 2016-06-03 10:47:47 -07:00
block_based_filter_block.cc BlockBasedTable::FullFilterKeyMayMatch() Should skip prefix bloom if full key bloom exists 2016-06-10 16:27:56 -07:00
block_based_filter_block.h BlockBasedTable::FullFilterKeyMayMatch() Should skip prefix bloom if full key bloom exists 2016-06-10 16:27:56 -07:00
block_based_table_builder.cc store prefix_extractor_name in table 2016-08-26 11:46:32 -07:00
block_based_table_builder.h Experiments on column-aware encodings 2016-08-01 14:50:19 -07:00
block_based_table_factory.cc Only cache level 0 indexes and filter when opening table reader 2016-07-20 11:23:31 -07:00
block_based_table_factory.h Only cache level 0 indexes and filter when opening table reader 2016-07-20 11:23:31 -07:00
block_based_table_reader.cc add nullptr check to internal_prefix_transform 2016-08-30 13:48:31 -07:00
block_based_table_reader.h Introduce Read amplification bitmap (read amp statistics) 2016-08-26 18:55:58 -07:00
block_builder.cc Miscellaneous performance improvements 2016-07-12 14:15:32 -07:00
block_builder.h TableBuilder / TableReader support for range deletion 2016-08-19 15:10:31 -07:00
block_prefix_index.cc Fix clang analyzer errors 2016-07-08 17:50:51 -07:00
block_prefix_index.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
block_test.cc Introduce Read amplification bitmap (read amp statistics) 2016-08-26 18:55:58 -07:00
block.cc Introduce Read amplification bitmap (read amp statistics) 2016-08-26 18:55:58 -07:00
block.h Introduce Read amplification bitmap (read amp statistics) 2016-08-26 18:55:58 -07:00
bloom_block.cc Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
bloom_block.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
cuckoo_table_builder_test.cc New Statistics to track Compression/Decompression (#1197) 2016-07-19 09:44:03 -07:00
cuckoo_table_builder.cc Embed column family name in SST file 2016-04-06 23:10:32 -07:00
cuckoo_table_builder.h Embed column family name in SST file 2016-04-06 23:10:32 -07:00
cuckoo_table_factory.cc Only cache level 0 indexes and filter when opening table reader 2016-07-20 11:23:31 -07:00
cuckoo_table_factory.h Only cache level 0 indexes and filter when opening table reader 2016-07-20 11:23:31 -07:00
cuckoo_table_reader_test.cc Embed column family name in SST file 2016-04-06 23:10:32 -07:00
cuckoo_table_reader.cc New Statistics to track Compression/Decompression (#1197) 2016-07-19 09:44:03 -07:00
cuckoo_table_reader.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
filter_block.h BlockBasedTable::FullFilterKeyMayMatch() Should skip prefix bloom if full key bloom exists 2016-06-10 16:27:56 -07:00
flush_block_policy.cc Miscellaneous performance improvements 2016-07-12 14:15:32 -07:00
format.cc New Statistics to track Compression/Decompression (#1197) 2016-07-19 09:44:03 -07:00
format.h New Statistics to track Compression/Decompression (#1197) 2016-07-19 09:44:03 -07:00
full_filter_block_test.cc Add statistics field to show total size of index and filter blocks in block cache 2016-06-03 10:47:47 -07:00
full_filter_block.cc BlockBasedTable::FullFilterKeyMayMatch() Should skip prefix bloom if full key bloom exists 2016-06-10 16:27:56 -07:00
full_filter_block.h BlockBasedTable::FullFilterKeyMayMatch() Should skip prefix bloom if full key bloom exists 2016-06-10 16:27:56 -07:00
get_context.cc Introduce FullMergeV2 (eliminate memcpy from merge operators) 2016-07-20 09:49:03 -07:00
get_context.h Introduce FullMergeV2 (eliminate memcpy from merge operators) 2016-07-20 09:49:03 -07:00
internal_iterator.h support Prev() in prefix seek mode 2016-08-29 20:55:39 -07:00
iter_heap.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
iterator_wrapper.h Introduce FullMergeV2 (eliminate memcpy from merge operators) 2016-07-20 09:49:03 -07:00
iterator.cc Rename iterator property "rocksdb.iterator.is.key.pinned" => "rocksdb.iterator.is-key-pinned" 2016-03-01 13:47:12 -08:00
merger_test.cc Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
merger.cc fix bug in merge_iterator when data race happens 2016-08-30 22:19:42 -07:00
merger.h support Prev() in prefix seek mode 2016-08-29 20:55:39 -07:00
meta_blocks.cc store prefix_extractor_name in table 2016-08-26 11:46:32 -07:00
meta_blocks.h New Statistics to track Compression/Decompression (#1197) 2016-07-19 09:44:03 -07:00
mock_table.cc Only cache level 0 indexes and filter when opening table reader 2016-07-20 11:23:31 -07:00
mock_table.h Only cache level 0 indexes and filter when opening table reader 2016-07-20 11:23:31 -07:00
persistent_cache_helper.cc Added PersistentCache abstraction 2016-05-15 22:17:18 -07:00
persistent_cache_helper.h Added PersistentCache abstraction 2016-05-15 22:17:18 -07:00
plain_table_builder.cc store prefix_extractor_name in table 2016-08-26 11:46:32 -07:00
plain_table_builder.h Embed column family name in SST file 2016-04-06 23:10:32 -07:00
plain_table_factory.cc store prefix_extractor_name in table 2016-08-26 11:46:32 -07:00
plain_table_factory.h Only cache level 0 indexes and filter when opening table reader 2016-07-20 11:23:31 -07:00
plain_table_index.cc Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
plain_table_index.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
plain_table_key_coding.cc Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
plain_table_key_coding.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
plain_table_reader.cc store prefix_extractor_name in table 2016-08-26 11:46:32 -07:00
plain_table_reader.h Skip bottom-level filter block caching when hit-optimized 2015-12-23 10:15:07 -08:00
scoped_arena_iterator.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
sst_file_writer.cc Add TablePropertiesCollector support in SstFileWriter 2016-08-19 16:17:56 -07:00
table_builder.h Shared dictionary compression using reference block 2016-04-27 17:36:03 -07:00
table_properties_internal.h TableBuilder / TableReader support for range deletion 2016-08-19 15:10:31 -07:00
table_properties.cc store prefix_extractor_name in table 2016-08-26 11:46:32 -07:00
table_reader_bench.cc Shared dictionary compression using reference block 2016-04-27 17:36:03 -07:00
table_reader.h TableBuilder / TableReader support for range deletion 2016-08-19 15:10:31 -07:00
table_test.cc store prefix_extractor_name in table 2016-08-26 11:46:32 -07:00
two_level_iterator.cc Minor PinnedIteratorsManager Refactoring 2016-08-11 11:54:17 -07:00
two_level_iterator.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00