cockroachdb / cockroachdb/cockroach
kvserver: mvcc first split key should use local max when split key is lower than local max
- 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
Assessment
This issue has not been assessed yet.