-
-
Notifications
You must be signed in to change notification settings - Fork 6
fix(trino): Backport airlift/airlift#1943 for max response header size #1510
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6313e2a
fix(trino): Backport airlift/airlift#1943 for max response header size
dervoeti a2d8d6f
Merge branch 'main' into feat/trino-airlift-http-response-size-patch
dervoeti fdd3f8c
chore: changelog
dervoeti ebb343b
Merge branch 'main' into feat/trino-airlift-http-response-size-patch
dervoeti 5e2dd96
Merge branch 'main' into feat/trino-airlift-http-response-size-patch
dervoeti 3f5a84e
fix: add 1GB limit
dervoeti 118658d
Merge branch 'feat/trino-airlift-http-response-size-patch' of https:/…
dervoeti fe40717
chore: add airlift version comment / fix mail address
dervoeti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7 | ||
| # check=error=true | ||
|
|
||
| # We use a custom patched airlift version to fast track https://github.com/airlift/airlift/pull/1943 | ||
| # This can be removed once the PR is merged and Trino makes use of the new Airlift version containing the fix | ||
|
|
||
| FROM local-image/java-devel AS airlift-builder | ||
|
|
||
| ARG PRODUCT_VERSION | ||
| ARG RELEASE_VERSION | ||
| ARG STACKABLE_USER_UID | ||
|
|
||
| WORKDIR /stackable | ||
|
|
||
| COPY --chown=${STACKABLE_USER_UID}:0 trino/airlift/stackable/patches/patchable.toml /stackable/src/trino/airlift/stackable/patches/patchable.toml | ||
| COPY --chown=${STACKABLE_USER_UID}:0 trino/airlift/stackable/patches/${PRODUCT_VERSION} /stackable/src/trino/airlift/stackable/patches/${PRODUCT_VERSION} | ||
|
|
||
| # hadolint ignore=SC2215 | ||
| RUN --mount=type=cache,id=maven-airlift-${PRODUCT_VERSION},target=/root/.m2/repository <<EOF | ||
| cd "$(/stackable/patchable --images-repo-root=src checkout trino/airlift ${PRODUCT_VERSION})" | ||
|
|
||
| NEW_VERSION="${PRODUCT_VERSION}-stackable${RELEASE_VERSION}" | ||
|
|
||
| mvn versions:set -DnewVersion=$NEW_VERSION -DartifactId='*' -DgroupId='*' -DgenerateBackupPoms=false | ||
|
|
||
| mvn \ | ||
| install \ | ||
| -DskipTests \ | ||
| -Dair.check.skip-all \ | ||
| -Dcheckstyle.skip \ | ||
| -Dmaven.javadoc.skip=true \ | ||
| -Dmaven.gitcommitid.skip=true \ | ||
| --projects='!sample-server,!skeleton-server' | ||
|
|
||
| mkdir -p /stackable/patched-libs/maven/io | ||
| cp -r /root/.m2/repository/io/airlift /stackable/patched-libs/maven/io | ||
|
|
||
| chmod --recursive g=u /stackable/patched-libs | ||
| EOF |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [versions."361".local-images] | ||
| java-devel = "24" | ||
|
|
||
| [versions."386".local-images] | ||
| java-devel = "25" |
35 changes: 35 additions & 0 deletions
35
...ift/stackable/patches/361/0001-Apply-max-response-header-size-to-Jetty-maxResponseH.patch
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| From 846dafacf01735c4eb507959f7b9456d8fe8ebdc Mon Sep 17 00:00:00 2001 | ||
| From: Lukas Krug <lukas.krug@stackable.tech> | ||
| Date: Wed, 27 May 2026 21:58:48 +0200 | ||
| Subject: Apply max response header size to Jetty maxResponseHeaderSize | ||
|
|
||
| --- | ||
| .../src/main/java/io/airlift/http/server/HttpServer.java | 2 +- | ||
| .../src/main/java/io/airlift/http/server/HttpServerConfig.java | 1 + | ||
| 2 files changed, 2 insertions(+), 1 deletion(-) | ||
|
|
||
| diff --git a/http-server/src/main/java/io/airlift/http/server/HttpServer.java b/http-server/src/main/java/io/airlift/http/server/HttpServer.java | ||
| index 6da8193ebe..5a8f4009bf 100644 | ||
| --- a/http-server/src/main/java/io/airlift/http/server/HttpServer.java | ||
| +++ b/http-server/src/main/java/io/airlift/http/server/HttpServer.java | ||
| @@ -193,7 +193,7 @@ public class HttpServer | ||
| baseHttpConfiguration.setRequestHeaderSize(toIntExact(config.getMaxRequestHeaderSize().toBytes())); | ||
| } | ||
| if (config.getMaxResponseHeaderSize() != null) { | ||
| - baseHttpConfiguration.setResponseHeaderSize(toIntExact(config.getMaxResponseHeaderSize().toBytes())); | ||
| + baseHttpConfiguration.setMaxResponseHeaderSize(toIntExact(config.getMaxResponseHeaderSize().toBytes())); | ||
| } | ||
| if (config.getOutputBufferSize() != null) { | ||
| baseHttpConfiguration.setOutputBufferSize(toIntExact(config.getOutputBufferSize().toBytes())); | ||
| diff --git a/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java b/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java | ||
| index c4ebbdf9d3..760f72347a 100644 | ||
| --- a/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java | ||
| +++ b/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java | ||
| @@ -372,6 +372,7 @@ public class HttpServerConfig | ||
| return this; | ||
| } | ||
|
|
||
| + @MaxDataSize("1GB") | ||
| public DataSize getMaxResponseHeaderSize() | ||
| { | ||
| return maxResponseHeaderSize; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| mirror = "https://github.com/stackabletech/airlift.git" | ||
| base = "69314d3f2d3a72533704b8ef08d68b23875c5513" |
35 changes: 35 additions & 0 deletions
35
...ift/stackable/patches/386/0001-Apply-max-response-header-size-to-Jetty-maxResponseH.patch
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| From 359fe4dbf5154df20701cea742177bd874949009 Mon Sep 17 00:00:00 2001 | ||
| From: Lukas Krug <lukas.krug@stackable.tech> | ||
| Date: Wed, 27 May 2026 21:58:48 +0200 | ||
| Subject: Apply max response header size to Jetty maxResponseHeaderSize | ||
|
|
||
| --- | ||
| .../src/main/java/io/airlift/http/server/HttpServer.java | 2 +- | ||
| .../src/main/java/io/airlift/http/server/HttpServerConfig.java | 1 + | ||
| 2 files changed, 2 insertions(+), 1 deletion(-) | ||
|
|
||
| diff --git a/http-server/src/main/java/io/airlift/http/server/HttpServer.java b/http-server/src/main/java/io/airlift/http/server/HttpServer.java | ||
| index 49a7de9374..fe3fa345aa 100644 | ||
| --- a/http-server/src/main/java/io/airlift/http/server/HttpServer.java | ||
| +++ b/http-server/src/main/java/io/airlift/http/server/HttpServer.java | ||
| @@ -204,7 +204,7 @@ public class HttpServer | ||
| baseHttpConfiguration.setRequestHeaderSize(toIntExact(config.getMaxRequestHeaderSize().toBytes())); | ||
| } | ||
| if (config.getMaxResponseHeaderSize() != null) { | ||
| - baseHttpConfiguration.setResponseHeaderSize(toIntExact(config.getMaxResponseHeaderSize().toBytes())); | ||
| + baseHttpConfiguration.setMaxResponseHeaderSize(toIntExact(config.getMaxResponseHeaderSize().toBytes())); | ||
| } | ||
| if (config.getOutputBufferSize() != null) { | ||
| baseHttpConfiguration.setOutputBufferSize(toIntExact(config.getOutputBufferSize().toBytes())); | ||
| diff --git a/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java b/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java | ||
| index ee53d470f6..3abbfeaabb 100644 | ||
| --- a/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java | ||
| +++ b/http-server/src/main/java/io/airlift/http/server/HttpServerConfig.java | ||
| @@ -387,6 +387,7 @@ public class HttpServerConfig | ||
| return this; | ||
| } | ||
|
|
||
| + @MaxDataSize("1GB") | ||
| public DataSize getMaxResponseHeaderSize() | ||
| { | ||
| return maxResponseHeaderSize; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| mirror = "https://github.com/stackabletech/airlift.git" | ||
| base = "edaccb04be472282c74507af9b7c38470b385685" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| upstream = "https://github.com/airlift/airlift.git" | ||
| default-mirror = "https://github.com/stackabletech/airlift.git" |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| [versions."477".local-images] | ||
| java-devel = "24" | ||
| # Airlift version comes from <dep.airlift.version> in | ||
| # https://github.com/trinodb/trino/blob/477/pom.xml | ||
| "trino/airlift" = "361" | ||
|
|
||
| [versions."479".local-images] | ||
| java-devel = "25" | ||
| # Airlift version comes from <dep.airlift.version> in | ||
| # https://github.com/trinodb/trino/blob/479/pom.xml | ||
| "trino/airlift" = "386" | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.