diff --git a/partition_version.hh b/partition_version.hh index 92ab4370a2..dae916e802 100644 --- a/partition_version.hh +++ b/partition_version.hh @@ -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;