Skip to main content

Module server

Module server 

Source
Expand description

Leader-side replication server for FixedStore.

  • Spawns a TCP acceptor thread.
  • On the first accepted follower connection, installs SPSC producers into every shard (lazy install — Mitigation B of spec §5/§7).
  • Each accepted connection spawns a per-shard serve thread that does Phase 1 (full scan catch-up, honoring FLAG_EMPTY_STATE to skip DELETED slots) then Phase 2 (SPSC streaming) if the per-shard consumer is still available.

Single-follower-streaming-per-shard limitation (v1): once the SPSC consumer for a shard has been handed to the first follower, subsequent followers get catch-up only — they idle after CaughtUp.

Structs§

FixedReplicationServer

Constants§

SPSC_CAPACITY