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

Support routing SQL transactions #526

Open
mosabua opened this issue Oct 16, 2024 · 3 comments
Open

Support routing SQL transactions #526

mosabua opened this issue Oct 16, 2024 · 3 comments

Comments

@mosabua
Copy link
Member

mosabua commented Oct 16, 2024

Trino Gateway does not support a sequence of statements like the following

START TRANSACTION;
...
various statements
...
COMMIT;

Problems are:

  • each statement is separate from the perspective of Trino Gateway
  • on its own "START TRANSACTION" has no context that can help routing to a specific cluster
  • a transaction id has to be carried through the whole sequence, but Trino Gateway does not support that

Potential ideas:

  • explicit flag to enable usage, initially default to false
  • implement carrying through transaction id
  • figure out how failure should work if routing is possible from additional info with one or more groups and cluster (for example .. is it fine to just route to adhoc group and any cluster as long as it then continues to stick thanks to transaction id
  • what do to about partial transactions without commit or rollback
@xkrogen
Copy link
Member

xkrogen commented Oct 16, 2024

This seems to relate heavily to #446 -- here we also have a problem that while in a transaction, we need sticky-routing based on some fields that the client holds/maintains.

@mosabua
Copy link
Member Author

mosabua commented Oct 16, 2024

This seems to relate heavily to #446 -- here we also have a problem that while in a transaction, we need sticky-routing based on some fields that the client holds/maintains.

Agreed.

@Chaho12
Copy link
Member

Chaho12 commented Oct 17, 2024

This code is out-of-date but we can refactor it to fit it to our gateway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants