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
main
Yanqin Jin 3 years ago committed by Facebook GitHub Bot
parent 3e1bf771a3
commit 1a79839c59
  1. 4
      utilities/transactions/pessimistic_transaction.h
  2. 2
      utilities/transactions/transaction_base.h
  3. 2
      utilities/write_batch_with_index/write_batch_with_index_internal.cc

@ -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;

@ -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();

@ -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

Loading…
Cancel
Save