From bf445d97e5375a20e8b93aaf5f91e2b584b69303 Mon Sep 17 00:00:00 2001 From: Calle Wilund Date: Tue, 12 May 2026 10:14:22 +0200 Subject: [PATCH] db::replay_position: Add attribute valid() Just to reduce the rp == db::replay_position() statements... --- db/commitlog/replay_position.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/commitlog/replay_position.hh b/db/commitlog/replay_position.hh index 7f368cf8e8..53bbbd0ecd 100644 --- a/db/commitlog/replay_position.hh +++ b/db/commitlog/replay_position.hh @@ -55,6 +55,10 @@ struct replay_position { template auto describe_type(sstables::sstable_version_types v, Describer f) { return f(id, pos); } + + bool valid() const { + return id != 0 && pos != 0; + } }; class commitlog;