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

Feature Request [driver]: Allow distribute transactions to commit or rollback from another connection #17786

Open
roderickyao opened this issue Feb 13, 2025 · 0 comments · May be fixed by #17787

Comments

@roderickyao
Copy link

roderickyao commented Feb 13, 2025

Feature Description

Currently the vitess driver does not allow commit or rollback a transaction if the request is not from the original connection.

We want to make the Vitess driver be able to commit or rollback a distributed transaction from another connection instead of only allowing from the original connection. To minimize the changes to end user, we can use a config field AllowDistributedTxCommitRollback defaults to False to control the behavior.

I can create a PR to show the idea.

Use Case(s)

We are considering Vitess as our core engine but keep client API the same. Our offering today is a set of RESTful APIs handled by a front end, which then constructs queries and forward to backend databases. Clients do not maintain connection with the front end in any transactions. This means that BEGIN, COMMIT and statements between could come from different front end nodes. That's why we want to allow COMMIT and ROLLBACK from non-original connection.

@roderickyao roderickyao added the Needs Triage This issue needs to be correctly labelled and triaged label Feb 13, 2025
@mattlord mattlord added Type: Feature Component: Driver Component: Query Serving and removed Needs Triage This issue needs to be correctly labelled and triaged labels Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants