GeezerVison is showing github.com — Update Netty to 4.2.16.Final by reta · Pull Request #22403 · opensearch-project/OpenSearch
Conversation
Description
Update Netty to 4.2.16.Final
Related Issues
N/A
Check List
- Functionality includes testing.
- API changes companion pull request created, if applicable.
- Public documentation issue/PR created, if applicable.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
PR Reviewer Guide 🔍
(Review updated until commit 7c0c0a7)
Here are some key observations to aid the review process:
| 🧪 No relevant tests |
| 🔒 No security concerns identified |
| ✅ No TODO sections |
| 🔀 No multiple PR themes
|
⚡ Recommended focus areas for review
Test Coverage Reduction
The iteration count was reduced from 1500 to 128 due to a Netty cap. This significantly reduces the load generated by this test, which was designed to verify request-size limiting behavior. Confirm that 128 requests still generate enough aggregate payload to meaningfully exercise the size-limit logic; otherwise the test may pass trivially without validating the intended behavior.
// See please https://github.com/netty/netty/pull/17068 why 128 is the cap, we should be able to
// make it configurable in the Netty next release.
for (int i = 0; i < 128; i++) {
Test Coverage Reduction
Same as above: the iteration count dropped from 1500 to 128. Verify the reduced request volume still triggers the request-size limit assertions this test relies on.
// See please https://github.com/netty/netty/pull/17068 why 128 is the cap, we should be able to
// make it configurable in the Netty next release.
for (int i = 0; i < 128; i++) {
|
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
❌ Gradle check result for f6a9566: FAILURE
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
reta
commented
Jul 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
❌ Gradle check result for f6a9566: FAILURE
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?
The org.opensearch.http.netty4.Netty4HttpRequestSizeLimitIT.testDoesNotLimitExcludedRequests test case failure is legit, sent a pull request to netty (see please netty/netty#17068). I do have mitigation to apply but would like to close the loop first.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
❌ Gradle check result for c37ff7d: FAILURE
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
PR Code Suggestions ✨
Latest suggestions up to 7c0c0a7
Explore these optional code suggestions:
| Category | Suggestion | Impact | | General |
Ensure reduced loop still exceeds size limit
Reducing the loop iterations from 1500 to 128 significantly weakens the test's assertion that excluded requests bypass the size limit. Since the original test used a large count to exceed the byte-size threshold (limit), verify that 128 requests still produce enough cumulative bytes to actually exceed the configured limit; otherwise the test could pass trivially even if the exclusion logic were broken. Consider asserting that the total request size exceeds the limit, or use larger per-request payloads to preserve the test's original intent.
modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HttpRequestSizeLimitIT.java [129-132]
// See please https://github.com/netty/netty/pull/17068 why 128 is the cap, we should be able to
// make it configurable in the Netty next release.
+// Note: ensure the cumulative payload of 128 requests still exceeds the configured HTTP size limit
+// so this test continues to validate exclusion behavior meaningfully.
for (int i = 0; i < 128; i++) {
requestUris.add(
Tuple.tuple("/_cluster/settings?cluster_manager_timeout=10s", "{ \"transient\": {\"search.default_search_timeout\": -1 } }")
);
Suggestion importance[1-10]: 6
__
Why: Valid concern that reducing iterations from 1500 to 128 might weaken the test's ability to exceed the size limit, potentially making the test pass trivially. However, the suggestion only asks to verify without providing a concrete fix.
| Low
|
Verify reduced count still triggers limit
Same concern as the Netty4 counterpart: dropping the count from 1500 to 128 may cause the aggregate payload to fall below the configured HTTP body size limit, making this test no longer validate the exclusion-from-limit behavior. Confirm that 128 iterations still produce enough bytes to exceed the limit, or increase per-request payload size to keep the test meaningful.
plugins/transport-reactor-netty4/src/internalClusterTest/java/org/opensearch/http/reactor/netty4/ReactorNetty4HttpRequestSizeLimitIT.java [130-132]
// See please https://github.com/netty/netty/pull/17068 why 128 is the cap, we should be able to
// make it configurable in the Netty next release.
+// Note: ensure the cumulative payload of 128 requests still exceeds the configured HTTP size limit.
for (int i = 0; i < 128; i++) {
requestUris.add(Tuple.tuple("/_cluster/settings", "{ \"transient\": {\"search.default_search_timeout\": \"40s\" } }"));
}
Suggestion importance[1-10]: 6
__
Why: Same valid concern regarding the reactor-netty4 counterpart test. The suggestion raises a legitimate testing integrity issue but only requests verification rather than providing a concrete change.
| Low
|
Previous suggestions
Suggestions up to commit 91b668d
| Category | Suggestion | Impact | | General |
Preserve test coverage after batch cap reduction
Reducing the iteration count from 1500 to 128 significantly weakens the test's ability to verify that excluded requests are not rate-limited. Consider sending multiple batches (or looping the batch dispatch) so the total number of requests still exceeds the previous threshold, ensuring the exclusion behavior is still meaningfully exercised.
modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HttpRequestSizeLimitIT.java [127-129]
-// See please https://github.com/netty/netty/pull/17068 why 128 is the cap, we should be able to
-// make it configurable in the Netty next release.
+// See please https://github.com/netty/netty/pull/17068 why 128 is the per-batch cap, we should be able to
+// make it configurable in the Netty next release. We dispatch multiple batches to keep meaningful coverage.
for (int i = 0; i < 128; i++) {
Suggestion importance[1-10]: 3
__
Why: The suggestion raises a valid concern about reduced test coverage, but the improved_code only changes a comment and doesn't actually implement the proposed multi-batch dispatch, making the suggestion largely non-actionable as presented.
| Low
|
Suggestions up to commit 3dccf0e
| Category | Suggestion | Impact | | General |
Verify reduced iteration count still tests limit
Reducing the loop iterations from 1500 to 128 significantly weakens the test coverage of the pipelining/excluded-requests limit behavior. Verify that 128 requests is still sufficient to trigger and validate the "excluded requests are not limited" scenario; otherwise the assertions downstream (e.g., ensuring no 429 responses) may pass trivially without exercising the intended breach threshold. Consider documenting the minimum iteration count needed to meaningfully test the limit, or gating the loop count on the actual configured breaker limit.
modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HttpRequestSizeLimitIT.java [127-129]
// See please https://github.com/netty/netty/pull/17068 why 128 is the cap, we should be able to
// make it configurable in the Netty next release.
+// NOTE: 128 must still exceed the in-flight request breaker threshold used by this test to remain meaningful.
for (int i = 0; i < 128; i++) {
Suggestion importance[1-10]: 4
__
Why: The suggestion raises a valid concern about test coverage being weakened by reducing iterations from 1500 to 128, but the improved code only adds a comment and does not provide a concrete solution. The change is driven by an external Netty cap, so the impact is limited.
| Low
|
Suggestions up to commit a40233d
| Category | Suggestion | Impact | | General |
Verify reduced iteration still validates exclusion
Reducing the loop count from 1500 to 128 to accommodate Netty's new cap may weaken this test's effectiveness at validating that excluded requests are not rate/size-limited (since the previous count likely far exceeded any limit threshold being tested). Verify the test still meaningfully exercises the exclusion logic at 128 iterations, or consider issuing requests in multiple batches to accumulate the previous volume while staying under the per-connection cap.
modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HttpRequestSizeLimitIT.java [129]
// See please https://github.com/netty/netty/pull/17068 why 128 is the cap, we should be able to
// make it configurable in the Netty next release.
+// TODO: revisit iteration count / batching once the Netty cap becomes configurable.
for (int i = 0; i < 128; i++) {
Suggestion importance[1-10]: 4
__
Why: The suggestion raises a valid concern about test effectiveness after reducing iterations from 1500 to 128, but only adds a TODO comment without making a substantive code change. Impact is limited.
| Low
|
Ensure test still detects limit regressions
Similarly, drastically reducing iterations from 1500 to 128 may make this test pass trivially even if the exclusion logic breaks, since 128 requests might fall under normal limits regardless. Consider asserting the exclusion behavior via a stronger signal (e.g., pipeline in multiple channels/batches) rather than relying solely on absolute count.
plugins/transport-reactor-netty4/src/internalClusterTest/java/org/opensearch/http/reactor/netty4/ReactorNetty4HttpRequestSizeLimitIT.java [130]
// See please https://github.com/netty/netty/pull/17068 why 128 is the cap, we should be able to
// make it configurable in the Netty next release.
+// TODO: revisit iteration count / batching once the Netty cap becomes configurable.
for (int i = 0; i < 128; i++) {
Suggestion importance[1-10]: 4
__
Why: Similar concern to the first suggestion - valid observation about potentially weakened test coverage, but the improved code only adds a TODO comment without a concrete fix.
| Low
|
Suggestions up to commit 1a48bf4
| Category | Suggestion | Impact | | General |
Preserve original test coverage volume
Reducing the loop iterations from 1500 to 128 significantly weakens the test's coverage of the excluded-requests behavior, since the original intent was to send a volume large enough to exceed the request size limit and verify exclusion. Consider preserving the original request volume by pipelining/batching in groups of ≤128 across multiple channel writes, so the test still exercises the exclusion path meaningfully rather than silently degrading.
modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HttpRequestSizeLimitIT.java [127-129]
-// See please https://github.com/netty/netty/pull/17068 why 128 is the cap, we should be able to
-// make it configurable in the Netty next release.
-for (int i = 0; i < 128; i++) {
+// See please https://github.com/netty/netty/pull/17068 why 128 is the cap per batch;
+// send multiple batches to preserve the original test volume until Netty exposes this as configurable.
+final int totalRequests = 1500;
+final int batchSize = 128;
+for (int i = 0; i < totalRequests; i++) {
Suggestion importance[1-10]: 4
__
Why: The suggestion raises a valid concern about reduced test coverage, but the proposed improved_code only changes the loop bounds without actually implementing the batching logic described, making it incomplete. Additionally, the cap of 128 may be a hard Netty limitation, so batching may not even be feasible without further changes.
| Low
|
Suggestions up to commit 91ab2a7
| Category | Suggestion | Impact | | General |
Preserve test coverage after loop reduction
Reducing the loop from 1500 to 128 iterations significantly weakens the test's ability to verify that excluded requests are not rate-limited (the original intent was clearly to send many more requests than the configured limit). Consider either sending requests in multiple batches of 128 to reach the original volume, or add an assertion/comment clarifying what limit value the reduced count is now validating against, to ensure the test still meaningfully exercises the exclusion behavior.
modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HttpRequestSizeLimitIT.java [129]
-// See please https://github.com/netty/netty/pull/17068 why 128 is the cap, we should be able to
-// make it configurable in the Netty next release.
+// See please https://github.com/netty/netty/pull/17068 why 128 is the cap per batch, we should be able to
+// make it configurable in the Netty next release. Send multiple batches to preserve original test coverage.
for (int i = 0; i < 128; i++) {
Suggestion importance[1-10]: 4
__
Why: The suggestion raises a valid concern about reduced test coverage from 1500 to 128 iterations, but the improved_code only tweaks a comment without actually implementing the batching solution proposed. Impact is moderate as it flags a real testing concern but doesn't provide a concrete fix.
| Low
|
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
❌ Gradle check result for 91ab2a7: FAILURE
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
codecov
Bot
commented
Jul 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.49%. Comparing base (632cbf4) to head (7c0c0a7).
Additional details and impacted files
@@ Coverage Diff @@
## main #22403 +/- ##
============================================
+ Coverage 73.44% 73.49% +0.05%
- Complexity 76497 76499 +2
============================================
Files 6104 6104
Lines 346568 346568
Branches 49883 49883
============================================
+ Hits 254546 254722 +176
+ Misses 71720 71566 -154
+ Partials 20302 20280 -22
☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
❕ Gradle check result for 3dccf0e: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 3, 2026
andrross
pushed a commit
that referenced
this pull request
Aug 5, 2026
…2636)
Netty 4.2.16 added a maxPipelineDepth to HttpContentEncoder with a default of 128
(netty/netty#17063), so a single connection carrying more pipelined requests than that
gets an IllegalStateException("maxPipelineDepth exceeded: 128") and the server closes it.
The client then receives none of its responses and fails on the 30s latch:
"Failed to get all expected responses: 150 left".
The Netty upgrade (#22403) already applied this cap to testDoesNotLimitExcludedRequests
in this same class, going from 1500 to 128 with a comment pointing at netty/netty#17068.
testLimitsInFlightRequests was left at 150 and hits the same wall, which is what makes
this class keep showing up in flaky reports (#18875) with a failure that is not actually
random: the encoder queue drains as responses are written, so the limit is only reached
when requests outrun responses -- which happens on a loaded CI host and not on a fast
local one.
128 still exercises what the test is for: the in-flight-requests breaker is set to 2 KB
and trips at 2880 bytes, i.e. after a handful of requests. Verified by mutation -- raising
the breaker to 2 GB fails the test, so the TOO_MANY_REQUESTS assertion still bites.
Note that the configurable variant reta added in netty/netty#17068 is not available yet:
it merged on 2026-07-10, three days after 4.2.16.Final was released, and 4.2.17 is not
out. Once it is, this cap can be driven from http.pipelining.max_events instead.
Signed-off-by: serhiy-bzhezytskyy <[email protected]>
vinaykpud
pushed a commit
to vinaykpud/OpenSearch
that referenced
this pull request
Aug 11, 2026
…ensearch-project#22636)
Netty 4.2.16 added a maxPipelineDepth to HttpContentEncoder with a default of 128
(netty/netty#17063), so a single connection carrying more pipelined requests than that
gets an IllegalStateException("maxPipelineDepth exceeded: 128") and the server closes it.
The client then receives none of its responses and fails on the 30s latch:
"Failed to get all expected responses: 150 left".
The Netty upgrade (opensearch-project#22403) already applied this cap to testDoesNotLimitExcludedRequests
in this same class, going from 1500 to 128 with a comment pointing at netty/netty#17068.
testLimitsInFlightRequests was left at 150 and hits the same wall, which is what makes
this class keep showing up in flaky reports (opensearch-project#18875) with a failure that is not actually
random: the encoder queue drains as responses are written, so the limit is only reached
when requests outrun responses -- which happens on a loaded CI host and not on a fast
local one.
128 still exercises what the test is for: the in-flight-requests breaker is set to 2 KB
and trips at 2880 bytes, i.e. after a handful of requests. Verified by mutation -- raising
the breaker to 2 GB fails the test, so the TOO_MANY_REQUESTS assertion still bites.
Note that the configurable variant reta added in netty/netty#17068 is not available yet:
it merged on 2026-07-10, three days after 4.2.16.Final was released, and 4.2.17 is not
out. Once it is, this cap can be driven from http.pipelining.max_events instead.
Signed-off-by: serhiy-bzhezytskyy <[email protected]>
Reviewers
cwperks
cwperks approved these changes
peternied
Awaiting requested review from peternied
peternied is a code owner
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
dependencies
Pull requests that update a dependency file
skip-diff-analyzer
Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|