cockroachdb / cockroachdb/cockroach
kv: skip MVCCValueHeader decoding when possible
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Describe the problem**
Currently, `decodeExtendedMVCCValue` always unmarshals the MVCC Value Header if it finds one. But, most callers do nothing with this header, making this unmarshalling wasted work. Previously, this was likely only a small issue as very few keys are expected to have a value header. But in recent releases IMPORT and LDR are both writing into the value header. As a result, we may see many more keys with value headers.
We should improve our methods here so that callers that don't care about the header can more quickly skip past it rather than unmarshalling it to avoid wasted work.
Jira issue: CRDB-42519
Contributor guide
Assessment
This issue has not been assessed yet.