Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvcoord: add RPC endpoint to issue BatchRequest through TxnCoordSender #67001

Closed
tbg opened this issue Jun 29, 2021 · 2 comments · Fixed by #72732
Closed

kvcoord: add RPC endpoint to issue BatchRequest through TxnCoordSender #67001

tbg opened this issue Jun 29, 2021 · 2 comments · Fixed by #72732
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team

Comments

@tbg
Copy link
Member

tbg commented Jun 29, 2021

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

@tbg tbg added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Jun 29, 2021
@blathers-crl blathers-crl bot added the T-kv KV Team label Jun 29, 2021
@tbg
Copy link
Member Author

tbg commented Nov 18, 2021

@erikgrinaker aren't you on this over in #72732?

@erikgrinaker
Copy link
Contributor

Yeah, that's basically it. It's not transactional by default, but falls back to TxnCoordSender if it spans ranges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-kv KV Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants