From ae7788022309ba9a61e91561dd1f9478ba3f6bf7 Mon Sep 17 00:00:00 2001 From: Ibrahim Jarif Date: Thu, 23 Apr 2020 12:26:56 -0700 Subject: [PATCH] Fix some typos in code comments (#6733) Summary: This PR fixes some typos in code comments. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6733 Reviewed By: siying Differential Revision: D21209037 Pulled By: zhichao-cao fbshipit-source-id: d9274611fab1f5e992998c8c4117b8078c4cbc69 --- table/block_based/block.cc | 6 +++--- table/block_based/block_based_table_reader.cc | 2 +- table/block_based/block_based_table_reader.h | 2 +- test_util/sync_point.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/table/block_based/block.cc b/table/block_based/block.cc index ea1934508..611c2ed9d 100644 --- a/table/block_based/block.cc +++ b/table/block_based/block.cc @@ -293,7 +293,7 @@ bool DataBlockIter::SeekForGetImpl(const Slice& target) { if (entry == kNoEntry) { // Even if we cannot find the user_key in this block, the result may - // exist in the next block. Consider this exmpale: + // exist in the next block. Consider this example: // // Block N: [aab@100, ... , app@120] // bounary key: axy@50 (we make minimal assumption about a boundary key) @@ -301,7 +301,7 @@ bool DataBlockIter::SeekForGetImpl(const Slice& target) { // // If seek_key = axy@60, the search will starts from Block N. // Even if the user_key is not found in the hash map, the caller still - // have to conntinue searching the next block. + // have to continue searching the next block. // // In this case, we pretend the key is the the last restart interval. // The while-loop below will search the last restart interval for the @@ -627,7 +627,7 @@ bool IndexBlockIter::ParseNextIndexKey() { // restart_point n-1: k, v (off, sz), k, v (delta-sz), ..., k, v (delta-sz) // where, k is key, v is value, and its encoding is in parenthesis. // The format of each key is (shared_size, non_shared_size, shared, non_shared) -// The format of each value, i.e., block hanlde, is (offset, size) whenever the +// The format of each value, i.e., block handle, is (offset, size) whenever the // shared_size is 0, which included the first entry in each restart point. // Otherwise the format is delta-size = block handle size - size of last block // handle. diff --git a/table/block_based/block_based_table_reader.cc b/table/block_based/block_based_table_reader.cc index e7f40d079..b685a450f 100644 --- a/table/block_based/block_based_table_reader.cc +++ b/table/block_based/block_based_table_reader.cc @@ -2171,7 +2171,7 @@ Status BlockBasedTable::Get(const ReadOptions& read_options, const Slice& key, size_t ts_sz = rep_->internal_comparator.user_comparator()->timestamp_size(); - bool matched = false; // if such user key mathced a key in SST + bool matched = false; // if such user key matched a key in SST bool done = false; for (iiter->Seek(key); iiter->Valid() && !done; iiter->Next()) { IndexValue v = iiter->value(); diff --git a/table/block_based/block_based_table_reader.h b/table/block_based/block_based_table_reader.h index bc73f2117..508906472 100644 --- a/table/block_based/block_based_table_reader.h +++ b/table/block_based/block_based_table_reader.h @@ -454,7 +454,7 @@ class BlockBasedTable : public TableReader { friend class DBBasicTest_MultiGetIOBufferOverrun_Test; }; -// Maitaning state of a two-level iteration on a partitioned index structure. +// Maintaining state of a two-level iteration on a partitioned index structure. class BlockBasedTable::PartitionedIndexIteratorState : public TwoLevelIteratorState { public: diff --git a/test_util/sync_point.h b/test_util/sync_point.h index 46bfd50d7..3fdbab547 100644 --- a/test_util/sync_point.h +++ b/test_util/sync_point.h @@ -127,7 +127,7 @@ class SyncPoint { } // namespace ROCKSDB_NAMESPACE // Use TEST_SYNC_POINT to specify sync points inside code base. -// Sync points can have happens-after depedency on other sync points, +// Sync points can have happens-after dependency on other sync points, // configured at runtime via SyncPoint::LoadDependency. This could be // utilized to re-produce race conditions between threads. // See TransactionLogIteratorRace in db_test.cc for an example use case.