diff --git a/mutation_partition.cc b/mutation_partition.cc index f2f377651e..325989eb8f 100644 --- a/mutation_partition.cc +++ b/mutation_partition.cc @@ -1763,6 +1763,25 @@ row row::difference(const schema& s, column_kind kind, const row& other) const return r; } +bool row_marker::compact_and_expire(tombstone tomb, gc_clock::time_point now, + can_gc_fn& can_gc, gc_clock::time_point gc_before) { + if (is_missing()) { + return false; + } + if (_timestamp <= tomb.timestamp) { + _timestamp = api::missing_timestamp; + return false; + } + if (_ttl > no_ttl && _expiry < now) { + _expiry -= _ttl; + _ttl = dead; + } + if (_ttl == dead && _expiry < gc_before && can_gc(tombstone(_timestamp, _expiry))) { + _timestamp = api::missing_timestamp; + } + return !is_missing() && _ttl != dead; +} + mutation_partition mutation_partition::difference(schema_ptr s, const mutation_partition& other) const { mutation_partition mp(s); diff --git a/mutation_partition.hh b/mutation_partition.hh index a233340fc5..17452de84d 100644 --- a/mutation_partition.hh +++ b/mutation_partition.hh @@ -443,23 +443,7 @@ public: // tombstones. // Returns true if row marker is live. bool compact_and_expire(tombstone tomb, gc_clock::time_point now, - can_gc_fn& can_gc, gc_clock::time_point gc_before) { - if (is_missing()) { - return false; - } - if (_timestamp <= tomb.timestamp) { - _timestamp = api::missing_timestamp; - return false; - } - if (_ttl > no_ttl && _expiry < now) { - _expiry -= _ttl; - _ttl = dead; - } - if (_ttl == dead && _expiry < gc_before && can_gc(tombstone(_timestamp, _expiry))) { - _timestamp = api::missing_timestamp; - } - return !is_missing() && _ttl != dead; - } + can_gc_fn& can_gc, gc_clock::time_point gc_before); // Consistent with feed_hash() bool operator==(const row_marker& other) const { if (_timestamp != other._timestamp) {