cockroachdb / cockroachdb/cockroach
Provide a way for SQL to surface the blocking statement during locking conflicts
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
This issue tracks enabling SQL to correlate which statement was blocking a transaction during locking conflicts (contention events) that result in high wait times. One solution is to persist the statement fingerprint id (uint64) of the blocking transaction in the lock.
[Slack context
](https://cockroachlabs.slack.com/archives/C0KB9Q03D/p1623690742334100?thread_ts=1623355651.265500&cid=C0KB9Q03D)Related issue: https://github.com/cockroachdb/cockroach/issues/72303
Jira issue: CRDB-24345
Contributor guide
Research direction
Start by tracing how SQL reports locking conflicts and contention events, then inspect how locks retain information about the blocking transaction. The issue's proposed direction is to associate the blocker with its statement fingerprint ID; done means SQL can surface which statement caused the blocking conflict, with the related issue providing additional context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100