From 1a79839c594997b5edeb22070a20edb4d5f1d803 Mon Sep 17 00:00:00 2001 From: Yanqin Jin Date: Mon, 11 Oct 2021 18:12:48 -0700 Subject: [PATCH] Some code cleanup (#9003) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/9003 cleanup some code before real work. Reviewed By: ltamasi Differential Revision: D31525563 fbshipit-source-id: 44558b3594f2200adc7d8621b08b06c77e358a27 --- utilities/transactions/pessimistic_transaction.h | 4 ++-- utilities/transactions/transaction_base.h | 2 +- .../write_batch_with_index/write_batch_with_index_internal.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utilities/transactions/pessimistic_transaction.h b/utilities/transactions/pessimistic_transaction.h index 6c5754ac6..d17899cd9 100644 --- a/utilities/transactions/pessimistic_transaction.h +++ b/utilities/transactions/pessimistic_transaction.h @@ -44,7 +44,7 @@ class PessimisticTransaction : public TransactionBaseImpl { PessimisticTransaction(const PessimisticTransaction&) = delete; void operator=(const PessimisticTransaction&) = delete; - virtual ~PessimisticTransaction(); + ~PessimisticTransaction() override; void Reinitialize(TransactionDB* txn_db, const WriteOptions& write_options, const TransactionOptions& txn_options); @@ -213,7 +213,7 @@ class WriteCommittedTxn : public PessimisticTransaction { WriteCommittedTxn(const WriteCommittedTxn&) = delete; void operator=(const WriteCommittedTxn&) = delete; - virtual ~WriteCommittedTxn() {} + ~WriteCommittedTxn() override {} private: Status PrepareInternal() override; diff --git a/utilities/transactions/transaction_base.h b/utilities/transactions/transaction_base.h index 2c5770d8a..3b2ed05df 100644 --- a/utilities/transactions/transaction_base.h +++ b/utilities/transactions/transaction_base.h @@ -31,7 +31,7 @@ class TransactionBaseImpl : public Transaction { TransactionBaseImpl(DB* db, const WriteOptions& write_options, const LockTrackerFactory& lock_tracker_factory); - virtual ~TransactionBaseImpl(); + ~TransactionBaseImpl() override; // Remove pending operations queued in this transaction. virtual void Clear(); diff --git a/utilities/write_batch_with_index/write_batch_with_index_internal.cc b/utilities/write_batch_with_index/write_batch_with_index_internal.cc index 6b264617c..ee893cdd9 100644 --- a/utilities/write_batch_with_index/write_batch_with_index_internal.cc +++ b/utilities/write_batch_with_index/write_batch_with_index_internal.cc @@ -517,7 +517,7 @@ Status ReadableWriteBatch::GetEntryFromDataOffset(size_t data_offset, // 1. first compare the column family, the one with larger CF will be larger; // 2. Inside the same CF, we first decode the entry to find the key of the entry // and the entry with larger key will be larger; -// 3. If two entries are of the same CF and offset, the one with larger offset +// 3. If two entries are of the same CF and key, the one with larger offset // will be larger. // Some times either `entry1` or `entry2` is dummy entry, which is actually // a search key. In this case, in step 2, we don't go ahead and decode the