Compress large prepared statements headers#11098
Merged
findepi merged 3 commits intotrinodb:masterfrom Feb 23, 2022
Merged
Conversation
It's name suggested it's specifically for `X-Trino-Set-Session` only.
Member
Author
electrum
reviewed
Feb 18, 2022
Member
There was a problem hiding this comment.
Make these configurable in ProtocolConfig. This will also allow disabling if necessary, in case someone has a compatibility issue. You can inject this class into both of the calling classes.
Member
There was a problem hiding this comment.
You can use java.util.Base64#getUrlEncoder
Member
Author
There was a problem hiding this comment.
encodeToString requires copying the input data into new byte[]
Contributor
There was a problem hiding this comment.
Nit: maybe rename to COMPRESSION_THRESHOLD_LENGTH, I assumed this was bytes initially.
electrum
approved these changes
Feb 18, 2022
electrum
approved these changes
Feb 18, 2022
fc819b6 to
5105225
Compare
Member
Author
|
AC |
5105225 to
24acb43
Compare
hashhar
reviewed
Feb 22, 2022
core/trino-main/src/main/java/io/trino/server/ServerMainModule.java
Outdated
Show resolved
Hide resolved
This allows working with larger prepared statements before hitting header size limits (on either server, or intermediate proxy). Since the client should not make assumption on any specific format of prepared statements in the headers, the compression is applied unconditionally.
24acb43 to
2c6a169
Compare
Closed
Member
|
Filed #11169 to follow up with needed docs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows working with larger prepared statements before hitting
header size limits (on either server, or intermediate proxy).
Since the client should not make assumption on any specific format of
prepared statements in the headers, the compression is applied
unconditionally.