cockroachdb / cockroachdb/cockroach
concurrency: invalid locks-wait in jaeger trace
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Describe the problem**
Was looking at a statement bundle[^1] and noticed this:
The `locks-wait` is clearly bogus. The real wait in this case should be O(100ms).
For this support escalation, this bug is inconsequential since we have the entire statement trace and can derive the actual wait times. But if this data is used for anything, it would produce wildly incorrect results.
The tag comes from this code:
[/pkg/kv/kvserver/concurrency/lock_table_waiter.go#L1175-L1180](https://github.com/cockroachdb/cockroach/blob/1e94511c37667e95b503c40952506c4c47e2e7a1/pkg/kv/kvserver/concurrency/lock_table_waiter.go#L1175-L1180)
```go
if lockWait != 0 {
tags = append(tags, attribute.KeyValue{
Key: tagWaited,
Value: attribute.StringValue(string(humanizeutil.Duration(lockWait))),
})
}
```
[^1]: stmt-bundle-999296444512665639 in https://github.com/cockroachlabs/support/issues/3079
Jira issue: CRDB-41866
Contributor guide
Assessment
This issue has not been assessed yet.