kvcoord: add RPC endpoint to issue BatchRequest through TxnCoordSender #67001
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-kv
KV Team
Is your feature request related to a problem? Please describe.
Unforeseen things happen and sometimes they require a mutation to the KV store that cannot be achieved through SQL. We currently don't have a way to run a "one-off" BatchRequest against a deployed cluster - this requires rebooting the cluster into a custom binary.
Describe the solution you'd like
I'd like an endpoint that is reachable via the inter-node certs (i.e. never reachable by anyone but the operator) that accepts a
BatchRequest
, which it then executes through aTxnCoordSender
.Describe alternatives you've considered
We could "just" use the already existing
Node.Batch
endpoint. However, this requires that theBatchRequest
already addresses the leaseholderReplica
, and does not allow cross-range requests. This is quite cumbersome.We could also provide access to
DistSender
instead ofTxnCoordSender
, but some operations require wrapping in a txn (when ranges are spanned) which theTxnCoordSender
carries out. (I might be wrong here since that might've changed, still, I don't see a benefit in skipping TxnCoordSender).A good benchmark should be that it should be possible to send a multi-range scan and a multi-range ClearRange. This will indicate that range-spanning txn'al and non-txn'al operations work well enough.
Additional context
The text was updated successfully, but these errors were encountered: