add missing check for hash index when calling BlockBasedTableIterator (#5712)
Summary: Previous PR https://github.com/facebook/rocksdb/pull/3601 added support for making prefix_extractor dynamically mutable. However, there was a missing check for hash index when creating new BlockBasedTableIterator. While the check may be redundant because no other types of IndexReader makes uses of the flag, it is less error-prone to add the missing check so that future index reader implementation will not worry about violating the contract. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5712 Differential Revision: D16842052 Pulled By: miasantreble fbshipit-source-id: aef11c0ff7a690ed248f5b8fe23481cac486b381
This commit is contained in:
parent
f2bf0b2d1e
commit
e89b1c9c6e
@ -3084,7 +3084,8 @@ InternalIterator* BlockBasedTable::NewIterator(
|
||||
arena->AllocateAligned(sizeof(BlockBasedTableIterator<DataBlockIter>));
|
||||
return new (mem) BlockBasedTableIterator<DataBlockIter>(
|
||||
this, read_options, rep_->internal_comparator,
|
||||
NewIndexIterator(read_options, need_upper_bound_check,
|
||||
NewIndexIterator(read_options, need_upper_bound_check &&
|
||||
rep_->index_type == BlockBasedTableOptions::kHashSearch,
|
||||
/*input_iter=*/nullptr, /*get_context=*/nullptr,
|
||||
&lookup_context),
|
||||
!skip_filters && !read_options.total_order_seek &&
|
||||
|
Loading…
Reference in New Issue
Block a user