Skip to content

[events] Freeze (hot → cold) #661

Description

@urvisavla

Implement the segment freeze process:

  1. Start new hot segment immediately (new segment accepts writes)
  2. Build cold segment from old hot segment using cold segment writer
    • If using LiveWriter: Freeze() in-place, then build index files
    • If using flat files/RocksDB: read events, produce cold segment
  3. Old hot segment continues serving reads during freeze
  4. Mark segment as frozen in DB atomically after all cold files are written
  5. Discard old hot segment files and in-memory index

Add tests for: freeze produces valid cold segment, concurrent reads during freeze, two hot segments coexist briefly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions