cockroachdb / cockroachdb/cockroach

kvserver: mvcc first split key should use local max when split key is lower than local max

Open
#104,995 0 comments 0 reactions 0 assignees View on GitHub
A-kv-distribution C-enhancement T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**
We added a check to return no split key in `MVCCFirstSplitKey` when the range's start key is less than `keys.LocalMax` https://github.com/cockroachdb/cockroach/pull/104082.

This check means the function will not return a split key for range1, even though we may wish to split meta2 for load. In practice this probably isn't very common, as meta2 would be split out from size based splits.

The solution is to mirror `MVCCFindSplitKey` which bumps the start key to `keys.LocalMax` if not at or higher already.

https://github.com/cockroachdb/cockroach/blob/6235182330907799ace972bdbc5f6df0b408f4e1/pkg/storage/mvcc.go#L5864-L5866

Jira issue: CRDB-28819

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.