Files
scylladb/replica/table.cc
Michael Litvak 9e0741e5b7 logstor: add segment sequence number
add a segment sequence number that is a global (per-shard) increasing
number that is allocated when getting a new segment for write, and is
written in buffer headers in the segment.

this is useful when scanning a segment for ignoring buffers that belong
to an older generation of that segment.

it's also useful by creating a single ordering of all segments that
respects the compaction ordering.

on recovery, we keep the records from the newest segments among equal
records. so if a record is rewritten by compaction, the recovery will
choose the records from the new compacted segments.

discard segments by writing zeroes to the segment header.
2026-05-17 17:22:27 +02:00

259 KiB