Skip to content

[events] Startup / crash recovery #662

Description

@urvisavla

Implement the startup procedure:

  1. Read segment state from DB
  2. If a freeze was in progress: discard partial cold files, restart freeze
  3. Truncate hot segment data beyond the last committed ledger. The exact mechanism depends on the hot storage backend (flat file truncation, packfile checkpoint, or RocksDB WAL)
  4. Replay persisted index deltas to rebuild in-memory bitmaps and ledger offset array
  5. Resume accepting writes

This ticket also adds index delta persistence to the hot segment write path, which was deferred until now.

Add tests for: clean startup, crash mid-ledger, crash mid-freeze, graceful restart.

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