cockroachdb / cockroachdb/cockroach

concurrency: invalid locks-wait in jaeger trace

Open
#130,075 1 comment 0 reactions 0 assignees View on GitHub
branch-master C-bug O-support P-3 T-kv
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:

image

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.