Revert "Fix a bug caused by recent fix of Prefix Hash (#6302)"
This reverts commit f8b5ef85ec
.
This commit is contained in:
parent
cad5db1c3e
commit
974dfc3de6
@ -4355,10 +4355,6 @@ TEST_F(DBTest2, BlockBasedTablePrefixIndexSeekForPrev) {
|
|||||||
if (iterator->Valid()) {
|
if (iterator->Valid()) {
|
||||||
ASSERT_EQ("a1", iterator->key().ToString());
|
ASSERT_EQ("a1", iterator->key().ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator->SeekForPrev("y3");
|
|
||||||
ASSERT_TRUE(iterator->Valid());
|
|
||||||
ASSERT_EQ("y1", iterator->key().ToString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,7 +390,6 @@ void IndexBlockIter::Seek(const Slice& target) {
|
|||||||
if (data_ == nullptr) { // Not init yet
|
if (data_ == nullptr) { // Not init yet
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
status_ = Status::OK();
|
|
||||||
uint32_t index = 0;
|
uint32_t index = 0;
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
if (prefix_index_) {
|
if (prefix_index_) {
|
||||||
@ -471,7 +470,6 @@ void IndexBlockIter::SeekToFirst() {
|
|||||||
if (data_ == nullptr) { // Not init yet
|
if (data_ == nullptr) { // Not init yet
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
status_ = Status::OK();
|
|
||||||
SeekToRestartPoint(0);
|
SeekToRestartPoint(0);
|
||||||
ParseNextIndexKey();
|
ParseNextIndexKey();
|
||||||
}
|
}
|
||||||
@ -490,7 +488,6 @@ void IndexBlockIter::SeekToLast() {
|
|||||||
if (data_ == nullptr) { // Not init yet
|
if (data_ == nullptr) { // Not init yet
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
status_ = Status::OK();
|
|
||||||
SeekToRestartPoint(num_restarts_ - 1);
|
SeekToRestartPoint(num_restarts_ - 1);
|
||||||
while (ParseNextIndexKey() && NextEntryOffset() < restarts_) {
|
while (ParseNextIndexKey() && NextEntryOffset() < restarts_) {
|
||||||
// Keep skipping
|
// Keep skipping
|
||||||
|
Loading…
Reference in New Issue
Block a user