cockroachdb / cockroachdb/cockroach
kv: batched intent resolution for same transaction performs redundant AbortSpan reads
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
When a large transaction is abandoned without cleanup up its intents, intent resolution is performed in batches of point `ResolveIntent` requests. During evaluation, each of these `ResolveIntent` requests calls into `UpdateAbortSpan` to update the abort span. While the majority of these calls to `UpdateAbortSpan` do not end up creating a new abort span entry, they do still pay the cost to read. This cost is non-negligible, as seen in the following CPU profile, where `UpdateAbortSpan` accounts for about 33% of time:

Eliminating the redundancy here could be a worthwhile performance optimization to speed up intent cleanup for abandoned transactions.
Jira issue: CRDB-30549
Contributor guide
Assessment
This issue has not been assessed yet.