cockroachdb / cockroachdb/cockroach
kv: assert in tests that lockTableWaiter's state channel receives timely signal
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Bugs like https://github.com/cockroachdb/cockroach/issues/112608 are difficult to catch because they result in a request waiting in the `lockTableWaiter` after having performed a successful push but failing to receive a notification on the `lockTableGuard.NewStateChan()`. The indicate a disconnect between the result of a PushTxn and the effect that the push had on the lock table.
We should detect such cases. One way to do so would be to add a test-only assertion after a successful push that waits for the new state channel to be signaled. If it is not signaled in some amount of time (30 seconds?), we panic with detailed information about the push and its response. Waiting would look similar to `watchForNotifications`, but with a timer branch.
Jira issue: CRDB-33138
Epic CRDB-34183
Contributor guide
Assessment
This issue has not been assessed yet.