-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: contention duration not recorded properly in SQL Stats #78675
Comments
Likely a bug within the trace analyzer |
Trace Analyzer only analyze the Contention events is embedded in the trace as Though it seems like there's another code path that bubbles up contention stats to SQL Stats somehow. 😕. |
Investigated further with help from @yuzefovich. Seems like in the default
Using |
Resolves cockroachdb#78675 Previously, contention stats was not collected for SQL Stats even when tracing was enabled. This was caused by two bugs: 1. instrumentationHelper skipping analyzing traces when tracing is enabled 2. transaction statistics ignore traces when tracing is turned on at the higher level. This commit ensures that contention stats is collected when tracing is turned on. Release note (bug fix): Contention statistics are now being collected for SQL Stats when tracing is enabled.
Resolves cockroachdb#78675 Previously, contention stats was not collected for SQL Stats even when tracing was enabled. This was caused by two bugs: 1. instrumentationHelper skipping analyzing traces when tracing is enabled 2. transaction statistics ignore traces when tracing is turned on at the higher level. This commit ensures that contention stats is collected when tracing is turned on. Release note (bug fix): Contention statistics are now being collected for SQL Stats when tracing is enabled.
Resolves #78675 Previously, contention stats was not collected for SQL Stats even when tracing was enabled. This was caused by two bugs: 1. instrumentationHelper skipping analyzing traces when tracing is enabled 2. transaction statistics ignore traces when tracing is turned on at the higher level. This commit ensures that contention stats is collected when tracing is turned on. Release note (bug fix): Contention statistics are now being collected for SQL Stats when tracing is enabled.
Discovered while working on #73566.
When a contention event is experienced, the contention event is recorded in the contention event registry. However, the same event is not reflected in the SQL Stats.
Observed using the following injected code:
conn_executor_exec.go
In
distsql_running.go
The following log entry shows the discrepancy:
Same discrepancy can be observed in
crdb_internal.transaction_contention_events
table and the SQL Stats tables.Jira issue: CRDB-14212
The text was updated successfully, but these errors were encountered: