rocksdb/table/block_based
sdong f10f135938 Fix regression bug of hash index with iterator total order seek (#6328)
Summary:
https://github.com/facebook/rocksdb/pull/6028 introduces a bug for hash index in SST files. If a table reader is created when total order seek is used, prefix_extractor might be passed into table reader as null. While later when prefix seek is used, the same table reader used, hash index is checked but prefix extractor is null and the program would crash.
Fix the issue by fixing http://github.com/facebook/rocksdb/pull/6028 in the way that prefix_extractor is preserved but ReadOptions.total_order_seek is checked

Also, a null pointer check is added so that a bug like this won't cause segfault in the future.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6328

Test Plan: Add a unit test that would fail without the fix. Stress test that reproduces the crash would pass.

Differential Revision: D19586751

fbshipit-source-id: 8de77690167ddf5a77a01e167cf89430b1bfba42
2020-01-27 15:44:54 -08:00
..
block_based_filter_block_test.cc Prepare filter tests for more implementations (#5967) 2019-10-31 14:12:33 -07:00
block_based_filter_block.cc Fix regression affecting partitioned indexes/filters when cache_index_and_filter_blocks is false (#5705) 2019-08-14 18:16:06 -07:00
block_based_filter_block.h Use delete to disable automatic generated methods. (#5009) 2019-09-11 18:09:00 -07:00
block_based_table_builder.cc Log warning for high bits/key in legacy Bloom filter (#6312) 2020-01-17 19:37:35 -08:00
block_based_table_builder.h Expose and elaborate FilterBuildingContext (#6088) 2019-11-26 18:24:10 -08:00
block_based_table_factory.cc kHashSearch incompatible with index_block_restart_interval>1 (#6294) 2020-01-14 11:21:27 -08:00
block_based_table_factory.h Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
block_based_table_reader.cc Fix regression bug of hash index with iterator total order seek (#6328) 2020-01-27 15:44:54 -08:00
block_based_table_reader.h Fix regression bug of hash index with iterator total order seek (#6328) 2020-01-27 15:44:54 -08:00
block_builder.cc Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
block_builder.h Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
block_prefix_index.cc Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
block_prefix_index.h Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
block_test.cc upgrade gtest 1.7.0 => 1.8.1 for json result writing 2019-09-09 11:24:11 -07:00
block_type.h Make the 'block read count' performance counters consistent (#5484) 2019-06-18 19:03:24 -07:00
block.cc Fix a bug caused by recent fix of Prefix Hash (#6302) 2020-01-16 10:47:20 -08:00
block.h Fix kHashSearch bug with SeekForPrev (#6297) 2020-01-15 14:28:39 -08:00
cachable_entry.h Move the filter readers out of the block cache (#5504) 2019-07-16 13:14:58 -07:00
data_block_footer.cc Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
data_block_footer.h Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
data_block_hash_index_test.cc Introduce a new storage specific Env API (#5761) 2019-12-13 14:48:41 -08:00
data_block_hash_index.cc Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
data_block_hash_index.h Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
filter_block_reader_common.cc Store the filter bits reader alongside the filter block contents (#5936) 2019-10-18 19:32:59 -07:00
filter_block_reader_common.h Fix regression affecting partitioned indexes/filters when cache_index_and_filter_blocks is false (#5705) 2019-08-14 18:16:06 -07:00
filter_block.h Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00
filter_policy_internal.h Warn on excessive keys for legacy Bloom filter with 32-bit hash (#6317) 2020-01-20 21:31:47 -08:00
filter_policy.cc Warn on excessive keys for legacy Bloom filter with 32-bit hash (#6317) 2020-01-20 21:31:47 -08:00
flush_block_policy.cc Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
flush_block_policy.h Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
full_filter_block_test.cc Expose and elaborate FilterBuildingContext (#6088) 2019-11-26 18:24:10 -08:00
full_filter_block.cc Store the filter bits reader alongside the filter block contents (#5936) 2019-10-18 19:32:59 -07:00
full_filter_block.h Store the filter bits reader alongside the filter block contents (#5936) 2019-10-18 19:32:59 -07:00
index_builder.cc kHashSearch incompatible with index_block_restart_interval>1 (#6294) 2020-01-14 11:21:27 -08:00
index_builder.h Add an option to put first key of each sst block in the index (#5289) 2019-06-24 20:54:04 -07:00
mock_block_based_table.h Log warning for high bits/key in legacy Bloom filter (#6312) 2020-01-17 19:37:35 -08:00
parsed_full_filter_block.cc Store the filter bits reader alongside the filter block contents (#5936) 2019-10-18 19:32:59 -07:00
parsed_full_filter_block.h New Bloom filter implementation for full and partitioned filters (#6007) 2019-11-13 16:44:01 -08:00
partitioned_filter_block_test.cc Expose and elaborate FilterBuildingContext (#6088) 2019-11-26 18:24:10 -08:00
partitioned_filter_block.cc Clean up PartitionedFilterBlockBuilder (#6299) 2020-01-27 13:15:14 -08:00
partitioned_filter_block.h Clean up PartitionedFilterBlockBuilder (#6299) 2020-01-27 13:15:14 -08:00
uncompression_dict_reader.cc Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00
uncompression_dict_reader.h Revert to storing UncompressionDicts in the cache (#5645) 2019-08-23 08:27:30 -07:00