Skip to main content

Module response_mgr

Module response_mgr 

Source
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:

  1. quorum size is max_responses / 2 + 1, matching the C formula in init_response_mgr;
  2. once at least quorum_responses good replies have arrived, the manager checks whether their body checksums agree and declares the request done.

Structs§

ResponseMgr
Per-DC response aggregator.

Enums§

QuorumOutcome
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_DC from the C reference.