db::commitlog: Add optional replay_position sieve to min_gc_time

Allows filtering out timestamps by replay position (i.e. skip
some segments)
This commit is contained in:
Calle Wilund
2026-05-12 10:15:24 +02:00
parent bf445d97e5
commit eef16c096c
2 changed files with 12 additions and 5 deletions

View File

@@ -375,7 +375,11 @@ public:
future<std::vector<sstring>> list_existing_segments() const;
future<std::vector<sstring>> list_existing_segments(const sstring& dir) const;
gc_clock::time_point min_gc_time(const cf_id_type&) const;
/**
* Gets the recorded min timestamp for the given id. Optionally filter by
* replay position, i.e. skip segments that have top position <= rp_filter
*/
gc_clock::time_point min_gc_time(const cf_id_type&, const db::replay_position& rp_filter = {}) const;
// Return the lowest possible replay position across all existing or future commitlog segments.
// In other words, only positions greater or equal to min_position() can