cockroachdb / cockroachdb/cockroach
sql: build SQL equivalent of kvnemesis
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
A number of recent projects make non-trivial changes to the SQL write path:
- support for RBR tables under read committed isolation
- triggers
- buffered writes
Our current SQLSmith-based randomized tests do perform some writes, but do not directly check the validity of those writes. Adding SCRUB to the randomized tests (https://github.com/cockroachdb/cockroach/issues/138012) will help, but it would be nice to build a randomized test that is more deliberate about exercising and validating SQL writes.
We've talked about building something like kvnemesis for the SQL layer. Maybe one idea is a test that:
- constructs a random set of tables with random relationships (such as FK relationships or trigger-maintained relationships)
- issues random mutations against those tables
- check that referential integrity, constraints, uniqueness properties, index consistency, etc are maintained
Jira issue: CRDB-47344
Epic CRDB-55124
Contributor guide
Assessment
This issue has not been assessed yet.