cockroachdb / cockroachdb/cockroach
kv: add a "reason" to AdminSplitRequest
- 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
Assessment
This issue has not been assessed yet.