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
main
anand76 4 years ago committed by Facebook GitHub Bot
parent 1600aac46f
commit bd5d9e2a1d
  1. 2
      table/block_based/block_based_table_reader_test.cc
  2. 20
      table/block_based/partitioned_index_iterator.cc
  3. 6
      table/block_based/partitioned_index_iterator.h
  4. 2
      table/block_based/partitioned_index_reader.cc

@ -293,7 +293,7 @@ TEST_P(BlockBasedTableReaderTestVerifyChecksum, ChecksumMismatch) {
}
ASSERT_OK(iiter->status());
iiter->SeekToFirst();
BlockHandle handle = static_cast<ParititionedIndexIterator*>(iiter)
BlockHandle handle = static_cast<PartitionedIndexIterator*>(iiter)
->index_iter_->value()
.handle;
table.reset();

@ -9,11 +9,11 @@
#include "table/block_based/partitioned_index_iterator.h"
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();
if (target) {
@ -47,7 +47,7 @@ void ParititionedIndexIterator::SeekImpl(const Slice* target) {
}
}
void ParititionedIndexIterator::SeekToLast() {
void PartitionedIndexIterator::SeekToLast() {
SavePrevIndexValue();
index_iter_->SeekToLast();
if (!index_iter_->Valid()) {
@ -59,20 +59,20 @@ void ParititionedIndexIterator::SeekToLast() {
FindKeyBackward();
}
void ParititionedIndexIterator::Next() {
void PartitionedIndexIterator::Next() {
assert(block_iter_points_to_real_block_);
block_iter_.Next();
FindKeyForward();
}
void ParititionedIndexIterator::Prev() {
void PartitionedIndexIterator::Prev() {
assert(block_iter_points_to_real_block_);
block_iter_.Prev();
FindKeyBackward();
}
void ParititionedIndexIterator::InitPartitionedIndexBlock() {
void PartitionedIndexIterator::InitPartitionedIndexBlock() {
BlockHandle partitioned_index_handle = index_iter_->value().handle;
if (!block_iter_points_to_real_block_ ||
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.
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
// whether a block can be empty so it can be replaced by an "if".
do {
@ -143,7 +143,7 @@ void ParititionedIndexIterator::FindBlockForward() {
} while (!block_iter_.Valid());
}
void ParititionedIndexIterator::FindKeyBackward() {
void PartitionedIndexIterator::FindKeyBackward() {
while (!block_iter_.Valid()) {
if (!block_iter_.status().ok()) {
return;

@ -18,11 +18,11 @@ namespace ROCKSDB_NAMESPACE {
// 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
// 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 =
// true
public:
ParititionedIndexIterator(
PartitionedIndexIterator(
const BlockBasedTable* table, const ReadOptions& read_options,
const InternalKeyComparator& icomp,
std::unique_ptr<InternalIteratorBase<IndexValue>>&& index_iter,
@ -38,7 +38,7 @@ class ParititionedIndexIterator : public InternalIteratorBase<IndexValue> {
lookup_context_(caller),
block_prefetcher_(compaction_readahead_size) {}
~ParititionedIndexIterator() {}
~PartitionedIndexIterator() override {}
void Seek(const Slice& target) override;
void SeekForPrev(const Slice&) override {

@ -88,7 +88,7 @@ InternalIteratorBase<IndexValue>* PartitionIndexReader::NewIterator(
index_has_first_key(), index_key_includes_seq(),
index_value_is_full()));
it = new ParititionedIndexIterator(
it = new PartitionedIndexIterator(
table(), ro, *internal_comparator(), std::move(index_iter),
lookup_context ? lookup_context->caller
: TableReaderCaller::kUncategorized);

Loading…
Cancel
Save