cockroachdb / cockroachdb/cockroach

kv: add a "reason" to AdminSplitRequest

Open
#110,935 1 comment 2 reactions 0 assignees View on GitHub
branch-release-23.2 C-enhancement O-premortem 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.**

`AdminSplit` currently accepts just a `SplitKey` and `PredicateKeys`. It is desirable to also allow a reason to be provided:

https://github.com/cockroachdb/cockroach/blob/0fbda83bf1128ff2fdc1d406651b7c3d29c56ef0/pkg/kv/kvpb/api.proto#L1009-L1019

The reason would be used to log the origin of the split request e.g.
- `sql command`
- `backfiller`

This reason would then populate the range log entry (and log).

**Additional context**

Currently, `AdminSplit` has the reason as "manual":

https://github.com/cockroachdb/cockroach/blob/0fbda83bf1128ff2fdc1d406651b7c3d29c56ef0/pkg/kv/kvserver/replica_send.go#L950-L950

Jira issue: CRDB-31680

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.