ConsistencyConfig
Default consistency levels applied to all operations.
Override per-operation or per-table with @ReadConsistency/@WriteConsistency annotations, or pass a consistency parameter directly to repository methods.
Resolution order (highest priority first):
Per-operation parameter
@ReadConsistency/@WriteConsistencyon the entity classThese defaults
Read-your-writes above RF 2 (see ISS-069 / GH #70 item 3, corrected by ISS-075 / GH #83): read-your-writes requires the strict inequality R + W > RF — with R + W == RF, an unlucky replica placement can still make the read set and write set fully disjoint (e.g. RF=3, a write quorum of 2 lands on replicas {A, B}, and a single-replica read happens to land on {C} — no overlap). Only R + W > RF guarantees overlap, by pigeonhole. The defaults below (LOCAL_ONE + LOCAL_QUORUM) sum to a fixed weight of 1 + quorum(RF), which only exceeds RF for RF <= 2 (at RF = 3, 1 + 2 = 3 does not exceed 3) — a keyspace with RF = 3 or higher using these defaults silently stops guaranteeing read-your-writes. This is exactly the kind of thing that passes every test against an RF=1 Testcontainers setup and surfaces as a mystery stale-read bug only under a real multi-replica production topology — raise defaultRead (e.g. to LOCAL_QUORUM) once your keyspace's replication factor exceeds 2. strictMode (below) checks this directly against the resolved table's actual replication factor (read live from driver metadata) instead of relying on this comment alone — see StatementBuilder's warnIfRfConsistencyMismatch.
Properties
Multi-DC topology signal — not user-set directly (hence InternalKandraApi). Automatically derived and populated by the Kandra Ktor plugin's install path from KandraConfig.loadBalancing.allowedRemoteDcs.isNotEmpty(). A user configuring multi-DC failover already sets allowedRemoteDcs; combined with strictMode, StatementBuilder can then warn on LOCAL_ONE/ONE resolutions without requiring any additional user-facing config, and without kandra-runtime depending on kandra-multidc (or vice versa).
Strict Mode (GH #5) — opt-in, default false, WARN-only, never throws.