From 6d4832a998291ac7493bf65d66bc76998ef91b24 Mon Sep 17 00:00:00 2001 From: Li Peng Date: Thu, 28 Apr 2016 17:30:44 +0800 Subject: [PATCH] Merge pull request #1101 from flyd1005/wip-fix-typo fix typos and remove duplicated words --- arcanist_util/cpp_linter/cpplint.py | 2 +- db/compaction.h | 2 +- db/db_impl.h | 2 +- db/db_iterator_test.cc | 2 +- db/db_test.cc | 2 +- include/rocksdb/convenience.h | 4 ++-- include/rocksdb/options.h | 4 ++-- include/rocksdb/utilities/transaction.h | 2 +- include/rocksdb/utilities/transaction_db.h | 4 ++-- port/win/env_win.cc | 2 +- table/block_based_table_reader.h | 2 +- utilities/transactions/transaction_base.h | 2 +- utilities/transactions/transaction_lock_mgr.cc | 4 ++-- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/arcanist_util/cpp_linter/cpplint.py b/arcanist_util/cpp_linter/cpplint.py index 3bb33e17b..3d0c45a6d 100755 --- a/arcanist_util/cpp_linter/cpplint.py +++ b/arcanist_util/cpp_linter/cpplint.py @@ -2714,7 +2714,7 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): # Look for < that is not surrounded by spaces. This is only # triggered if both sides are missing spaces, even though - # technically should should flag if at least one side is missing a + # technically should flag if at least one side is missing a # space. This is done to avoid some false positives with shifts. match = Search(r'[^\s<]<([^\s=<].*)', reduced_line) if (match and diff --git a/db/compaction.h b/db/compaction.h index cab0d9c0c..c1ec45081 100644 --- a/db/compaction.h +++ b/db/compaction.h @@ -271,7 +271,7 @@ class Compaction { // A copy of inputs_, organized more closely in memory autovector input_levels_; - // State used to check for number of of overlapping grandparent files + // State used to check for number of overlapping grandparent files // (grandparent == "output_level_ + 1") std::vector grandparents_; const double score_; // score that was used to pick this compaction. diff --git a/db/db_impl.h b/db/db_impl.h index 60af1f550..98373a3a6 100644 --- a/db/db_impl.h +++ b/db/db_impl.h @@ -232,7 +232,7 @@ class DBImpl : public DB { // SST files will also be checked. // // If a key is found, *found_record_for_key will be set to true and - // *seq will will be set to the stored sequence number for the latest + // *seq will be set to the stored sequence number for the latest // operation on this key or kMaxSequenceNumber if unknown. // If no key is found, *found_record_for_key will be set to false. // diff --git a/db/db_iterator_test.cc b/db/db_iterator_test.cc index 94bdbcd13..e76f09e85 100644 --- a/db/db_iterator_test.cc +++ b/db/db_iterator_test.cc @@ -865,7 +865,7 @@ TEST_F(DBIteratorTest, DBIteratorBoundTest) { ASSERT_EQ(iter->key().compare(("b1")), 0); iter->Next(); - // the iteration should stop as soon as the the bound key is reached + // the iteration should stop as soon as the bound key is reached // even though the key is deleted // hence internal_delete_skipped_count should be 0 ASSERT_TRUE(!iter->Valid()); diff --git a/db/db_test.cc b/db/db_test.cc index 2b1eab3b5..bf82b5a28 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -2564,7 +2564,7 @@ TEST_F(DBTest, SharedWriteBuffer) { static_cast(1)); } - // "nikitich" still has has data of 80KB + // "nikitich" still has data of 80KB // Inserting Data in "dobrynia" triggers "nikitich" flushing. ASSERT_OK(Put(3, Key(2), DummyString(40000))); ASSERT_OK(Put(2, Key(2), DummyString(40000))); diff --git a/include/rocksdb/convenience.h b/include/rocksdb/convenience.h index b4935ce6e..47fe6f1f9 100644 --- a/include/rocksdb/convenience.h +++ b/include/rocksdb/convenience.h @@ -18,7 +18,7 @@ namespace rocksdb { // base_options, and return the new options as a result. // // If input_strings_escaped is set to true, then each escaped characters -// prefixed by '\' in the the values of the opts_map will be further +// prefixed by '\' in the values of the opts_map will be further // converted back to the raw string before assigning to the associated // options. Status GetColumnFamilyOptionsFromMap( @@ -30,7 +30,7 @@ Status GetColumnFamilyOptionsFromMap( // base_options, and return the new options as a result. // // If input_strings_escaped is set to true, then each escaped characters -// prefixed by '\' in the the values of the opts_map will be further +// prefixed by '\' in the values of the opts_map will be further // converted back to the raw string before assigning to the associated // options. Status GetDBOptionsFromMap( diff --git a/include/rocksdb/options.h b/include/rocksdb/options.h index ead7b1588..01c3e80ac 100644 --- a/include/rocksdb/options.h +++ b/include/rocksdb/options.h @@ -179,7 +179,7 @@ struct ColumnFamilyOptions { int rocksdb_minor_version = 6); // Some functions that make it easier to optimize RocksDB - // Use if if your DB is very small (like under 1GB) and you don't want to + // Use this if your DB is very small (like under 1GB) and you don't want to // spend lots of memory for memtables. ColumnFamilyOptions* OptimizeForSmallDb(); @@ -666,7 +666,7 @@ struct ColumnFamilyOptions { // If you'd like to customize some of these options, you will need to // use NewBlockBasedTableFactory() to construct a new table factory. - // This option allows user to to collect their own interested statistics of + // This option allows user to collect their own interested statistics of // the tables. // Default: empty vector -- no user-defined statistics collection will be // performed. diff --git a/include/rocksdb/utilities/transaction.h b/include/rocksdb/utilities/transaction.h index 4ccbb7fb9..80f6a898a 100644 --- a/include/rocksdb/utilities/transaction.h +++ b/include/rocksdb/utilities/transaction.h @@ -341,7 +341,7 @@ class Transaction { // committed. // // Note: You should not write or delete anything from the batch directly and - // should only use the the functions in the Transaction class to + // should only use the functions in the Transaction class to // write to this transaction. virtual WriteBatchWithIndex* GetWriteBatch() = 0; diff --git a/include/rocksdb/utilities/transaction_db.h b/include/rocksdb/utilities/transaction_db.h index ff29bc57a..39f0f8a3f 100644 --- a/include/rocksdb/utilities/transaction_db.h +++ b/include/rocksdb/utilities/transaction_db.h @@ -54,10 +54,10 @@ struct TransactionDBOptions { // If negative, there is no timeout and will block indefinitely when acquiring // a lock. // - // Not using a a timeout can lead to deadlocks. Currently, there + // Not using a timeout can lead to deadlocks. Currently, there // is no deadlock-detection to recover from a deadlock. While DB writes // cannot deadlock with other DB writes, they can deadlock with a transaction. - // A negative timeout should only be used if all transactions have an small + // A negative timeout should only be used if all transactions have a small // expiration set. int64_t default_lock_timeout = 1000; // 1 second diff --git a/port/win/env_win.cc b/port/win/env_win.cc index 7dcb5a6de..05d2576b6 100644 --- a/port/win/env_win.cc +++ b/port/win/env_win.cc @@ -1953,7 +1953,7 @@ class WinEnv : public Env { // generation time. std::thread& terminating_thread = bgthreads_.back(); auto tid = terminating_thread.get_id(); - // Ensure that that this thread is ours + // Ensure that this thread is ours assert(tid == std::this_thread::get_id()); terminating_thread.detach(); bgthreads_.pop_back(); diff --git a/table/block_based_table_reader.h b/table/block_based_table_reader.h index 3e1feaa8d..8f55f119b 100644 --- a/table/block_based_table_reader.h +++ b/table/block_based_table_reader.h @@ -92,7 +92,7 @@ class BlockBasedTable : public TableReader { GetContext* get_context, bool skip_filters = false) override; // Pre-fetch the disk blocks that correspond to the key range specified by - // (kbegin, kend). The call will return return error status in the event of + // (kbegin, kend). The call will return error status in the event of // IO or iteration error. Status Prefetch(const Slice* begin, const Slice* end) override; diff --git a/utilities/transactions/transaction_base.h b/utilities/transactions/transaction_base.h index db33b6f65..256a53aad 100644 --- a/utilities/transactions/transaction_base.h +++ b/utilities/transactions/transaction_base.h @@ -244,7 +244,7 @@ class TransactionBaseImpl : public Transaction { // Stores that time the txn was constructed, in microseconds. uint64_t start_time_; - // Stores the current snapshot that was was set by SetSnapshot or null if + // Stores the current snapshot that was set by SetSnapshot or null if // no snapshot is currently set. std::shared_ptr snapshot_; diff --git a/utilities/transactions/transaction_lock_mgr.cc b/utilities/transactions/transaction_lock_mgr.cc index f4fd9aff2..28e85986a 100644 --- a/utilities/transactions/transaction_lock_mgr.cc +++ b/utilities/transactions/transaction_lock_mgr.cc @@ -135,8 +135,8 @@ void TransactionLockMgr::AddColumnFamily(uint32_t column_family_id) { void TransactionLockMgr::RemoveColumnFamily(uint32_t column_family_id) { // Remove lock_map for this column family. Since the lock map is stored - // as a shared ptr, concurrent transactions can still keep keep using it - // until they release their reference to it. + // as a shared ptr, concurrent transactions can still keep using it + // until they release their references to it. { InstrumentedMutexLock l(&lock_map_mutex_);