Skip to main content

Module commit_policy

Module commit_policy 

Source
Expand description

Primary commit policies (PLAN.md Phase 11.4).

Local — commit returns after the local WAL is durable (default; current behaviour). No replica involvement at commit time.

RemoteWal — commit returns after the WAL segment containing the transaction has been archived to the remote backend. Bounds durability to “survives a single-node loss as long as the remote is reachable”.

AckN(n) — commit returns after n replicas have ack’d the transaction’s LSN via ack_replica_lsn. n=0 is equivalent to Local. The primary blocks the commit response until the count is met or RED_REPLICATION_ACK_TIMEOUT_MS elapses.

Quorum — future policy backed by QuorumConfig once quorum coordination is wired into the commit path. For now this is a marker enum value; the runtime falls back to Local semantics and emits a warning at boot when set.

In this sprint only the enum + parsing + observability are wired. Actually blocking commits on RemoteWal / AckN / Quorum is out of scope; the write path still returns after local durability regardless of the configured policy. See PLAN.md 11.4 “default v1 behavior remains local”.

Enums§

CommitPolicy