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:
parent
dddb791c18
commit
a7478070f3
@ -451,12 +451,11 @@ class Status {
|
|||||||
std::string ToString() const;
|
std::string ToString() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// A nullptr state_ (which is always the case for OK) means the message
|
|
||||||
// is empty, else state_ points to message.
|
|
||||||
|
|
||||||
Code code_;
|
Code code_;
|
||||||
SubCode subcode_;
|
SubCode subcode_;
|
||||||
Severity sev_;
|
Severity sev_;
|
||||||
|
// A nullptr state_ (which is at least the case for OK) means the extra
|
||||||
|
// message is empty.
|
||||||
const char* state_;
|
const char* state_;
|
||||||
#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
|
#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
|
||||||
mutable bool checked_ = false;
|
mutable bool checked_ = false;
|
||||||
|
@ -202,7 +202,8 @@ class TransactionBaseImpl : public Transaction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Snapshot* GetSnapshot() const override {
|
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;
|
virtual void SetSnapshot() override;
|
||||||
|
@ -122,7 +122,7 @@ struct WriteBatchIndexEntry {
|
|||||||
// make the entry just larger than all entries with the search key so
|
// make the entry just larger than all entries with the search key so
|
||||||
// SeekForPrev() will see all the keys with the same key.
|
// SeekForPrev() will see all the keys with the same key.
|
||||||
size_t offset;
|
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_offset; // offset of the key in write batch's string buffer.
|
||||||
size_t key_size; // size of the key. kFlagMinInCf indicates
|
size_t key_size; // size of the key. kFlagMinInCf indicates
|
||||||
// that this is a dummy look up entry for
|
// that this is a dummy look up entry for
|
||||||
|
Loading…
x
Reference in New Issue
Block a user