Multi-leader store without a conflict policy
warningmulti-leader-store-without-conflict-policy
Multi-leader replication accepts concurrent writes in several regions. With no conflict resolution policy declared, divergent replicas are reconciled by accident rather than by design.
- Severity
- warning
- Selects
- every node of kind nosql-database
- Components in scope
- 47
It looks at every node of kind nosql-database, and fires when:
- — all of these hold:
- — the node's `replication` is "multi-region-multi-leader"
- — any of these hold:
- — the node's `conflictResolution` has no value
- — the node's `conflictResolution` is "none"
Store '{{node.id}}' is multi-leader across regions with no conflict resolution policy. Declare last-writer-wins, vector-clock or app-merge.Reference designs whose broken twin names this rule in its header. The gate reads the same header, and fails when a rule no design trips.
# yaml-language-server: $schema=../schema/rule.schema.json # Multi-leader replication accepts concurrent writes in several regions. Without a declared # conflict resolution policy, divergent replicas are reconciled by accident. # Tripped by: designs/object-storage.broken.yaml schemaVersion: "1" type: "rule" id: "multi-leader-store-without-conflict-policy" severity: "warning" select: node: kind: "nosql-database" when: all: - prop: "replication" equals: "multi-region-multi-leader" - any: - prop: "conflictResolution" exists: false - prop: "conflictResolution" equals: "none" message: "Store '{{node.id}}' is multi-leader across regions with no conflict resolution policy. Declare last-writer-wins, vector-clock or app-merge."