Expand description
Follower-read decision gate.
FollowerReadGate answers a single question: “given the
session’s ReadConsistency and the local node’s role + closed
timestamp for the target Raft group, can this read be served
locally without forwarding to the leader?”
§Decision table
| Consistency | Local role | Closed TS fresh? | Serve locally? |
|---|---|---|---|
| Strong | * | * | Only if leader |
| BoundedStaleness(d) | Follower | ≤ d | Yes |
| BoundedStaleness(d) | Follower | > d | No → forward |
| BoundedStaleness(d) | Leader | * | Yes |
| Eventual | * | * | Yes |
The gate is stateless — it reads from shared handles to the closed-timestamp tracker and the raft-status provider.
Structs§
- Follower
Read Gate - Answers “can this read be served locally?”
Enums§
- Read
Level - Consistency level for a single read — mirrors the
ReadConsistencyenum in thenodedbcrate without couplingnodedb-clusterto it.