From 974dfc3de6920c9879b2ff64a043e955b4e20858 Mon Sep 17 00:00:00 2001 From: sdong Date: Mon, 27 Jan 2020 14:56:41 -0800 Subject: [PATCH] Revert "Fix a bug caused by recent fix of Prefix Hash (#6302)" This reverts commit f8b5ef85ec159d1b8e5db2c8a3f57dd3aa5771be. --- db/db_test2.cc | 4 ---- table/block_based/block.cc | 3 --- 2 files changed, 7 deletions(-) diff --git a/db/db_test2.cc b/db/db_test2.cc index e74344410..7f724ac72 100644 --- a/db/db_test2.cc +++ b/db/db_test2.cc @@ -4355,10 +4355,6 @@ TEST_F(DBTest2, BlockBasedTablePrefixIndexSeekForPrev) { if (iterator->Valid()) { ASSERT_EQ("a1", iterator->key().ToString()); } - - iterator->SeekForPrev("y3"); - ASSERT_TRUE(iterator->Valid()); - ASSERT_EQ("y1", iterator->key().ToString()); } } diff --git a/table/block_based/block.cc b/table/block_based/block.cc index 1aa5bfe54..cfa042d6e 100644 --- a/table/block_based/block.cc +++ b/table/block_based/block.cc @@ -390,7 +390,6 @@ void IndexBlockIter::Seek(const Slice& target) { if (data_ == nullptr) { // Not init yet return; } - status_ = Status::OK(); uint32_t index = 0; bool ok = false; if (prefix_index_) { @@ -471,7 +470,6 @@ void IndexBlockIter::SeekToFirst() { if (data_ == nullptr) { // Not init yet return; } - status_ = Status::OK(); SeekToRestartPoint(0); ParseNextIndexKey(); } @@ -490,7 +488,6 @@ void IndexBlockIter::SeekToLast() { if (data_ == nullptr) { // Not init yet return; } - status_ = Status::OK(); SeekToRestartPoint(num_restarts_ - 1); while (ParseNextIndexKey() && NextEntryOffset() < restarts_) { // Keep skipping