-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kvcoord: add RPC endpoint to issue BatchRequest through TxnCoordSender #67001
Description
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 a TxnCoordSender.
Describe alternatives you've considered
We could "just" use the already existing Node.Batch endpoint. However, this requires that the BatchRequest already addresses the leaseholder Replica, and does not allow cross-range requests. This is quite cumbersome.
We could also provide access to DistSender instead of TxnCoordSender, but some operations require wrapping in a txn (when ranges are spanned) which the TxnCoordSender 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