diff --git a/include/rocksdb/status.h b/include/rocksdb/status.h index a60212b89..6f6f09c5c 100644 --- a/include/rocksdb/status.h +++ b/include/rocksdb/status.h @@ -451,12 +451,11 @@ class Status { std::string ToString() const; protected: - // A nullptr state_ (which is always the case for OK) means the message - // is empty, else state_ points to message. - Code code_; SubCode subcode_; Severity sev_; + // A nullptr state_ (which is at least the case for OK) means the extra + // message is empty. const char* state_; #ifdef ROCKSDB_ASSERT_STATUS_CHECKED mutable bool checked_ = false; diff --git a/utilities/transactions/transaction_base.h b/utilities/transactions/transaction_base.h index 3b2ed05df..7febb10ba 100644 --- a/utilities/transactions/transaction_base.h +++ b/utilities/transactions/transaction_base.h @@ -202,7 +202,8 @@ class TransactionBaseImpl : public Transaction { } const Snapshot* GetSnapshot() const override { - return snapshot_ ? snapshot_.get() : nullptr; + // will return nullptr when there is no snapshot + return snapshot_.get(); } virtual void SetSnapshot() override; diff --git a/utilities/write_batch_with_index/write_batch_with_index_internal.h b/utilities/write_batch_with_index/write_batch_with_index_internal.h index 8085f5f50..4a5a5bc18 100644 --- a/utilities/write_batch_with_index/write_batch_with_index_internal.h +++ b/utilities/write_batch_with_index/write_batch_with_index_internal.h @@ -122,7 +122,7 @@ struct WriteBatchIndexEntry { // make the entry just larger than all entries with the search key so // SeekForPrev() will see all the keys with the same key. size_t offset; - uint32_t column_family; // c1olumn family of the entry. + uint32_t column_family; // column family of the entry. size_t key_offset; // offset of the key in write batch's string buffer. size_t key_size; // size of the key. kFlagMinInCf indicates // that this is a dummy look up entry for