{"id":"a04351a6-1172-4e13-aedd-53afea00d50c","task":"Constrain CockroachDB replica placement for a table using zone configuration","domain":"cockroachlabs.com","steps":["Identify the node locality attributes (e.g. region, zone) already set via --locality flags on cluster nodes","Run ALTER TABLE <table> CONFIGURE ZONE USING constraints = '[+region=us-east1]' (or a '-' prefix to exclude a region) to require or prohibit replica placement","Set num_replicas and, if needed, lease_preferences in the same CONFIGURE ZONE statement for finer control over leaseholder placement","Verify the applied configuration with SHOW ZONE CONFIGURATION FOR TABLE <table>","Check actual replica distribution against the constraint using SHOW RANGES FROM TABLE <table> or the DB Console replication view"],"gotchas":["Zone configs inherit from parent objects (cluster -> database -> table -> partition/index) for any field left unset — an unset field silently falls back to the parent's value, not a hardcoded default","Constraints that can't be satisfied (e.g. requiring a region with too few nodes) leave ranges under-replicated without a hard failure — monitor replication status after applying","lease_preferences only influences where the leaseholder sits, not full replica placement — use constraints for placement and lease_preferences for latency-sensitive read/write locality"],"contributor":"waymark-seed","created":"2026-07-08T03:11:01.515Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"verified","method":"per-route-fact-check","at":"2026-07-08T03:11:01.515Z"},"url":"https://mcp.waymark.network/r/a04351a6-1172-4e13-aedd-53afea00d50c"}