strictMode
Strict Mode (GH #5) — opt-in, default false, WARN-only, never throws.
When true and multiDcTopology is also true, StatementBuilder logs a WARN every time a query resolves (after per-call override / @ReadConsistency/@WriteConsistency / these defaults) to LOCAL_ONE or ONE. In a multi-DC deployment those levels are satisfied by a single replica in a single datacenter — usually not what's intended, since LOCAL_QUORUM is the normal default for durability across datacenters. This never throws or blocks the query — it only warns, so turning it on cannot break an existing deployment.
Set via the consistency { } DSL block in install(Kandra) { }:
install(Kandra) {
consistency { strictMode = true }
loadBalancing { allowedRemoteDcs = listOf("eu-west") } // multi-DC topology signal
}Also enables the RF-vs-(R+W) check (ISS-075 / GH #83): independently of multiDcTopology, when strictMode is true, StatementBuilder reads the resolved table's actual replication factor from live driver metadata and warns whenever the resolved read/write consistency pair doesn't satisfy R + W > RF (strictly) — the read-your-writes guarantee described above. Unlike the LOCAL_ONE/ONE check, this one applies on a single-DC cluster too (an RF 2 keyspace is not exclusive to multi-DC deployments) — e.g. it fires for the defaults above once RF >= 3.