Fix small issues (#5896)

Summary:
The individual commits in this PR should be self-explanatory.
All small and _very_ low-priority changes.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/5896

Reviewed By: riversand963

Differential Revision: D18065108

Pulled By: mrambacher

fbshipit-source-id: 236b1a1d9d21f982cc08aa67027108dde5eaf280
This commit is contained in:
jsteemann 2021-11-08 12:31:22 -08:00 committed by Facebook GitHub Bot
parent dddb791c18
commit a7478070f3
3 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

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