-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Introducing ExecuteMultiFetchAsDba
gRPC and vtctldclient ExecuteMultiFetchAsDBA
command
#15506
Introducing ExecuteMultiFetchAsDba
gRPC and vtctldclient ExecuteMultiFetchAsDBA
command
#15506
Conversation
…tchAsDBAResponse Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
… ExecuteMultiFetchAsDbaResponse Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15506 +/- ##
==========================================
- Coverage 67.41% 65.61% -1.81%
==========================================
Files 1560 1563 +3
Lines 192752 194638 +1886
==========================================
- Hits 129952 127703 -2249
- Misses 62800 66935 +4135 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Shlomi Noach <[email protected]>
@@ -30,6 +30,7 @@ Available Commands: | |||
ExecuteFetchAsApp Executes the given query as the App user on the remote tablet. | |||
ExecuteFetchAsDBA Executes the given query as the DBA user on the remote tablet. | |||
ExecuteHook Runs the specified hook on the given tablet. | |||
ExecuteMultiFetchAsDBA Executes given multiple queries as the DBA user on the remote tablet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For symmetry with the other ExecuteFetch
, does this mean we also want / need ExecuteMultiFetchAsApp
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. We have a specific use case for DBA
, and no specific use case for App
, so unsure we should add just for the sake of symmetry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shlomi-noach My thinking is that it would be mostly for people using ExecuteFetchAsApp
with multiple queries and have it kinda accidentally mostly work. They wouldn't have anywhere to go if we don't have it. I don't know if this is a real valid concern though or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having consulted with the team, we should not add ExecuteMultiFetchAsApp
right now. Only when there's a specific use case.
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Docs PR: vitessio/website#1709 |
Description
See #15505 for context. This PR adds:
ExecuteMultiFetchAsDba
gRPC call, withExecuteMultiFetchAsDbaRequest
andExecuteMultiFetchAsDbaResponse
proto messages.vtctldclient ExecuteMultiFetchAsDBA
command, which acts very similarly toExecuteFetchAsDBA
, except it returns a list of results (seen in--json
as an array of results).The behavior of
ExecuteFetchAsDBA
inrpc_query.go
remains unchanged, although we consolidate its logic with the newExecuteMultiFetchAsDBA
implementation.The main changes of this PR are in
go/vt/vttablet/tabletmanager/rpc_query.go
and ingo/cmd/vtctldclient/command/query.go
. The rest is gRPC/interface boilerplate and testing.Docs: vitessio/website#1709
No backport required.
Related Issue(s)
ExecuteMultiFetchAsDba
gRPC method #15505ExecuteFetchAsDBA
against multi-statements, excluding a sequence ofCREATE TABLE|VIEW
. #14954Checklist
Deployment Notes