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

Tracking: introduce ExecuteMultiFetchAsDba gRPC method #15505

Open
shlomi-noach opened this issue Mar 18, 2024 · 0 comments
Open

Tracking: introduce ExecuteMultiFetchAsDba gRPC method #15505

shlomi-noach opened this issue Mar 18, 2024 · 0 comments

Comments

@shlomi-noach
Copy link
Contributor

shlomi-noach commented Mar 18, 2024

Feature Description

As a reminder, we recently fixed an ExecuteFetchAsDBA issue where:

  • ExecuteFetchAsDBA would allow multiple queries in a single call.
  • The error result was only checked for the first query, ignored for 2nd, 3rd, ... queries.
  • Query results for 2nd, 3rd, ... queries were left unconsumed, and returned with the connection back into the pool, thereby leaking results into other users of the pool.

The fix included:

However, the work is incomplete. We had to exclude a specific use case in rpc_query.go: ApplySchema can execute potentially multiple DDLs and runs these via ExecuteFetchAsDBA.

The roadmap to the complete fix is:

v20:

  • Introduce a ExecuteMultiFetchAsDba gRPC call, which safely runs multiple statements, checks error and breaks on first error, and returns multiple result sets.
  • Introduce a vtctldclient ExecuteMultiFetchAsDBA command, which calls ExecuteMultiFetchAsDba gRPC method and returns a list of result sets.

v21:

(skipped/delayed to next version)

v22:

  • ApplySchema()/TabletExecutor to use ExecuteMultiFetchAsDba instead of ExecuteFetchAsDba.

v23:

  • ExecuteFetchAsDBA in rpc_query.go to disallow any form of multiple queries.

Use Case(s)

@shlomi-noach shlomi-noach self-assigned this Mar 18, 2024
@shlomi-noach shlomi-noach changed the title Feature Request: introduce ExecuteMultiFetchAsDba gRPC method Tracking: introduce ExecuteMultiFetchAsDba gRPC method May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant