Expand description
Per-DC response aggregation and quorum decisions.
When the engine forwards a request to multiple peer replicas, the
arriving responses are routed through a ResponseMgr that
tracks how many replies are good, how many errored, and whether
the body checksums agree. The aggregator keeps a fixed-size
array sized for MAX_REPLICAS_PER_DC replicas because the
consistency model is fundamentally a small, finite-state
decision table.
The state machine is the union of two observations:
- quorum size is
max_responses / 2 + 1, matching the C formula ininit_response_mgr; - once at least
quorum_responsesgood replies have arrived, the manager checks whether their body checksums agree and declares the request done.
Structs§
- Response
Mgr - Per-DC response aggregator.
Enums§
- Quorum
Outcome - Decision the manager has reached about an outstanding request.
Constants§
- MAX_
REPLICAS_ PER_ DC - Maximum replicas per datacenter the engine tracks. Matches
MAX_REPLICAS_PER_DCfrom the C reference.