mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-02 13:06:57 +00:00
mvcc: Make the null state of partition_snapshot::change_mark explicit
This commit is contained in:
@@ -196,6 +196,8 @@ public:
|
||||
// References and iterators into versions owned by the snapshot
|
||||
// obtained between two equal change_mark objects were produced
|
||||
// by that snapshot are guaranteed to be still valid.
|
||||
//
|
||||
// Has a null state which is != than anything returned by get_change_mark().
|
||||
class change_mark {
|
||||
uint64_t _reclaim_count = 0;
|
||||
size_t _versions_count = 0; // merge_partition_versions() removes versions on merge
|
||||
@@ -211,6 +213,9 @@ public:
|
||||
bool operator!=(const change_mark& m) const {
|
||||
return !(*this == m);
|
||||
}
|
||||
explicit operator bool() const {
|
||||
return _reclaim_count > 0;
|
||||
}
|
||||
};
|
||||
private:
|
||||
schema_ptr _schema;
|
||||
|
||||
Reference in New Issue
Block a user