Fix misspelling of PartitionedIndexIterator (#7450)
Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/7450 Reviewed By: zhichao-cao Differential Revision: D23992811 Pulled By: anand1976 fbshipit-source-id: 71bd898aafce6a3add3c8cd86d9f0e0fb63860cf
This commit is contained in:
parent
1600aac46f
commit
bd5d9e2a1d
@ -293,7 +293,7 @@ TEST_P(BlockBasedTableReaderTestVerifyChecksum, ChecksumMismatch) {
|
|||||||
}
|
}
|
||||||
ASSERT_OK(iiter->status());
|
ASSERT_OK(iiter->status());
|
||||||
iiter->SeekToFirst();
|
iiter->SeekToFirst();
|
||||||
BlockHandle handle = static_cast<ParititionedIndexIterator*>(iiter)
|
BlockHandle handle = static_cast<PartitionedIndexIterator*>(iiter)
|
||||||
->index_iter_->value()
|
->index_iter_->value()
|
||||||
.handle;
|
.handle;
|
||||||
table.reset();
|
table.reset();
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
#include "table/block_based/partitioned_index_iterator.h"
|
#include "table/block_based/partitioned_index_iterator.h"
|
||||||
|
|
||||||
namespace ROCKSDB_NAMESPACE {
|
namespace ROCKSDB_NAMESPACE {
|
||||||
void ParititionedIndexIterator::Seek(const Slice& target) { SeekImpl(&target); }
|
void PartitionedIndexIterator::Seek(const Slice& target) { SeekImpl(&target); }
|
||||||
|
|
||||||
void ParititionedIndexIterator::SeekToFirst() { SeekImpl(nullptr); }
|
void PartitionedIndexIterator::SeekToFirst() { SeekImpl(nullptr); }
|
||||||
|
|
||||||
void ParititionedIndexIterator::SeekImpl(const Slice* target) {
|
void PartitionedIndexIterator::SeekImpl(const Slice* target) {
|
||||||
SavePrevIndexValue();
|
SavePrevIndexValue();
|
||||||
|
|
||||||
if (target) {
|
if (target) {
|
||||||
@ -47,7 +47,7 @@ void ParititionedIndexIterator::SeekImpl(const Slice* target) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParititionedIndexIterator::SeekToLast() {
|
void PartitionedIndexIterator::SeekToLast() {
|
||||||
SavePrevIndexValue();
|
SavePrevIndexValue();
|
||||||
index_iter_->SeekToLast();
|
index_iter_->SeekToLast();
|
||||||
if (!index_iter_->Valid()) {
|
if (!index_iter_->Valid()) {
|
||||||
@ -59,20 +59,20 @@ void ParititionedIndexIterator::SeekToLast() {
|
|||||||
FindKeyBackward();
|
FindKeyBackward();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParititionedIndexIterator::Next() {
|
void PartitionedIndexIterator::Next() {
|
||||||
assert(block_iter_points_to_real_block_);
|
assert(block_iter_points_to_real_block_);
|
||||||
block_iter_.Next();
|
block_iter_.Next();
|
||||||
FindKeyForward();
|
FindKeyForward();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParititionedIndexIterator::Prev() {
|
void PartitionedIndexIterator::Prev() {
|
||||||
assert(block_iter_points_to_real_block_);
|
assert(block_iter_points_to_real_block_);
|
||||||
block_iter_.Prev();
|
block_iter_.Prev();
|
||||||
|
|
||||||
FindKeyBackward();
|
FindKeyBackward();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParititionedIndexIterator::InitPartitionedIndexBlock() {
|
void PartitionedIndexIterator::InitPartitionedIndexBlock() {
|
||||||
BlockHandle partitioned_index_handle = index_iter_->value().handle;
|
BlockHandle partitioned_index_handle = index_iter_->value().handle;
|
||||||
if (!block_iter_points_to_real_block_ ||
|
if (!block_iter_points_to_real_block_ ||
|
||||||
partitioned_index_handle.offset() != prev_block_offset_ ||
|
partitioned_index_handle.offset() != prev_block_offset_ ||
|
||||||
@ -108,7 +108,7 @@ void ParititionedIndexIterator::InitPartitionedIndexBlock() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParititionedIndexIterator::FindKeyForward() {
|
void PartitionedIndexIterator::FindKeyForward() {
|
||||||
// This method's code is kept short to make it likely to be inlined.
|
// This method's code is kept short to make it likely to be inlined.
|
||||||
|
|
||||||
assert(block_iter_points_to_real_block_);
|
assert(block_iter_points_to_real_block_);
|
||||||
@ -124,7 +124,7 @@ void ParititionedIndexIterator::FindKeyForward() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParititionedIndexIterator::FindBlockForward() {
|
void PartitionedIndexIterator::FindBlockForward() {
|
||||||
// TODO the while loop inherits from two-level-iterator. We don't know
|
// TODO the while loop inherits from two-level-iterator. We don't know
|
||||||
// whether a block can be empty so it can be replaced by an "if".
|
// whether a block can be empty so it can be replaced by an "if".
|
||||||
do {
|
do {
|
||||||
@ -143,7 +143,7 @@ void ParititionedIndexIterator::FindBlockForward() {
|
|||||||
} while (!block_iter_.Valid());
|
} while (!block_iter_.Valid());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParititionedIndexIterator::FindKeyBackward() {
|
void PartitionedIndexIterator::FindKeyBackward() {
|
||||||
while (!block_iter_.Valid()) {
|
while (!block_iter_.Valid()) {
|
||||||
if (!block_iter_.status().ok()) {
|
if (!block_iter_.status().ok()) {
|
||||||
return;
|
return;
|
||||||
|
@ -18,11 +18,11 @@ namespace ROCKSDB_NAMESPACE {
|
|||||||
// Some upper and lower bound tricks played in block based table iterators
|
// Some upper and lower bound tricks played in block based table iterators
|
||||||
// could be played here, but it's too complicated to reason about index
|
// could be played here, but it's too complicated to reason about index
|
||||||
// keys with upper or lower bound, so we skip it for simplicity.
|
// keys with upper or lower bound, so we skip it for simplicity.
|
||||||
class ParititionedIndexIterator : public InternalIteratorBase<IndexValue> {
|
class PartitionedIndexIterator : public InternalIteratorBase<IndexValue> {
|
||||||
// compaction_readahead_size: its value will only be used if for_compaction =
|
// compaction_readahead_size: its value will only be used if for_compaction =
|
||||||
// true
|
// true
|
||||||
public:
|
public:
|
||||||
ParititionedIndexIterator(
|
PartitionedIndexIterator(
|
||||||
const BlockBasedTable* table, const ReadOptions& read_options,
|
const BlockBasedTable* table, const ReadOptions& read_options,
|
||||||
const InternalKeyComparator& icomp,
|
const InternalKeyComparator& icomp,
|
||||||
std::unique_ptr<InternalIteratorBase<IndexValue>>&& index_iter,
|
std::unique_ptr<InternalIteratorBase<IndexValue>>&& index_iter,
|
||||||
@ -38,7 +38,7 @@ class ParititionedIndexIterator : public InternalIteratorBase<IndexValue> {
|
|||||||
lookup_context_(caller),
|
lookup_context_(caller),
|
||||||
block_prefetcher_(compaction_readahead_size) {}
|
block_prefetcher_(compaction_readahead_size) {}
|
||||||
|
|
||||||
~ParititionedIndexIterator() {}
|
~PartitionedIndexIterator() override {}
|
||||||
|
|
||||||
void Seek(const Slice& target) override;
|
void Seek(const Slice& target) override;
|
||||||
void SeekForPrev(const Slice&) override {
|
void SeekForPrev(const Slice&) override {
|
||||||
|
@ -88,7 +88,7 @@ InternalIteratorBase<IndexValue>* PartitionIndexReader::NewIterator(
|
|||||||
index_has_first_key(), index_key_includes_seq(),
|
index_has_first_key(), index_key_includes_seq(),
|
||||||
index_value_is_full()));
|
index_value_is_full()));
|
||||||
|
|
||||||
it = new ParititionedIndexIterator(
|
it = new PartitionedIndexIterator(
|
||||||
table(), ro, *internal_comparator(), std::move(index_iter),
|
table(), ro, *internal_comparator(), std::move(index_iter),
|
||||||
lookup_context ? lookup_context->caller
|
lookup_context ? lookup_context->caller
|
||||||
: TableReaderCaller::kUncategorized);
|
: TableReaderCaller::kUncategorized);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user