cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.1k stars 3.81k forks source link

cluster: add code to keep track of which server each settings object is attached to #112451

Open RaduBerinde opened 1 year ago

RaduBerinde commented 1 year ago

In #112395 we found that many existing tests inadvertently share the same Settings object between all the servers in a test cluster. This can cause some hard-to-debug test failures, but more importantly might obscure some actual defects - all servers have their settings state perfectly in sync which is not the case in a real cluster.

This issue tracks adding a general test-only mechanism that keeps track whether a Settings object is "attached" to a server and panics if we try to attach it twice.

Jira issue: CRDB-32425

blathers-crl[bot] commented 1 year ago

cc @cockroachdb/test-eng