-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Implement basic append: write full record frames (header + payload + checksum) to the current segment. When the segment reaches a configured max size (segment_max_bytes), roll to a new segment. Support sequential scan to read back appended records (no index yet).
Scope
-
Log::append(payload)(or equivalent): encode record (header + payload + checksum), append to current segment file. - Segment roll: when current segment size would exceed
segment_max_bytes, close current segment and open next (base_offset = next offset). Configurablesegment_max_bytes. - Sequential scan: iterate records from a given segment (or from first segment) in order; decode and yield (offset, payload) or error on corruption (checksum validation can be Day 5; here decoding is enough).
- Tests: append N records; scan and assert order and content; append until roll, then scan across segment boundary and assert continuity of offsets and payloads.
Acceptance criteria
- Append is append-only; offsets are monotonic across segment rolls.
- Scan reads back exactly what was appended, in order.
- Segment roll triggers at configured size; no record is split across segments.
Suggested commit
feat: append records with segment rolling
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels