-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add destination cluster info to response cookie #466
base: main
Are you sure you want to change the base?
Add destination cluster info to response cookie #466
Conversation
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
gateway-ha/src/main/java/io/trino/gateway/ha/config/HaGatewayConfiguration.java
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/config/HaGatewayConfiguration.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/config/HaGatewayConfiguration.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/proxyserver/ProxyRequestHandler.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/proxyserver/ProxyRequestHandler.java
Outdated
Show resolved
Hide resolved
I think a Cookie would be more appropriate than adding a new header. Typically headers implement the protocol, and cookies are used for storing session information and passing data back and forth |
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
@harishnelakurthi please sign the CLA so that we can take this forward, and address all comments. Please squash your commits as well. |
@willmostly - I have signed the CLA and emailed a week ago. Also, I've addressed all the comments on the PR except there was an open question which I have responded to the reviewer. Let me know if anything is needed from my end. |
@harishnelakurthi I think you may have missed my comment above. I would like to avoid adding a new header just to pass back information unrelated to the routing protocol. This should be a cookie. You can also update the logic such that the cookie is only added/updated in the response to a POST to |
Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla |
Thanks, @willmostly I have made the changes to pass this data via session cookie. Please review and let me know if any changes are needed. Also, updated the PR title and description. Will squash the commits before merge. |
Can we change the PR name and commit title to "cluster" instead of "backend" |
@harishnelakurthi you can use Airlift's codestyle in your IDE to avoid builds failing due to checkstyle https://github.com/airlift/codestyle |
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.
Looks pretty close % comments.
Can you add a test for this functionality? TestGatewayHaMultipleBackend
should have the infrastructure you need
Description
Add destination cluster a query is routed to in the cookie. More details here of the use-case here: #465
Additional context and related issues
#465
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: