Skip to content

fix(triple): release REST form request decoder - #16411

Open
014-code wants to merge 1 commit into
apache:3.3from
014-code:fix/triple-rest-form-decoder-cleanup
Open

fix(triple): release REST form request decoder#16411
014-code wants to merge 1 commit into
apache:3.3from
014-code:fix/triple-rest-form-decoder-cleanup

Conversation

@014-code

@014-code 014-code commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change?

Closes #16403.

Release the cached HttpPostRequestDecoder when a Triple REST request reaches a terminal state. This removes the synthetic request and parsed form data from Netty's static DefaultHttpDataFactory, preventing retained entries from accumulating after form requests.

The cleanup is invoked after successful invocation completion and on error, cancellation, and HTTP/2 transport close paths. It is intentionally not performed immediately after argument decoding so multipart data remains available to application code during request handling.

GitHub_issue

Closes #16403

Tests

Added completed form request releases post data to RestProtocolTest.

The test submits an application/x-www-form-urlencoded request, verifies the normal response, then asserts that DefaultHttpDataFactory.requestFileDeleteMap has no retained request entries.

Passed:

  • RestProtocolTest: 104 tests, 0 failures
  • JaCoCo verify: passed
  • DefaultHttpRequest.close(): 100% line and branch coverage
  • AbstractServerCallListener.closeRequest(): 100% line coverage

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction.
  • Make sure gitHub actions can pass.

@codecov-commenter

codecov-commenter commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.96%. Comparing base (c3ceb27) to head (e506c6c).
⚠️ Report is 18 commits behind head on 3.3.

Files with missing lines Patch % Lines
...c/protocol/tri/h12/AbstractServerCallListener.java 93.75% 0 Missing and 1 partial ⚠️
...tocol/tri/h12/AbstractServerTransportListener.java 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16411      +/-   ##
============================================
+ Coverage     60.79%   60.96%   +0.17%     
+ Complexity    11777    11765      -12     
============================================
  Files          1953     1954       +1     
  Lines         89208    89303      +95     
  Branches      13458    13476      +18     
============================================
+ Hits          54234    54448     +214     
+ Misses        29403    29261     -142     
- Partials       5571     5594      +23     
Flag Coverage Δ
integration-tests-java21 32.08% <38.09%> (-0.04%) ⬇️
integration-tests-java8 32.21% <38.09%> (-0.11%) ⬇️
samples-tests-java21 32.14% <0.00%> (+0.02%) ⬆️
samples-tests-java8 29.82% <0.00%> (-0.05%) ⬇️
unit-tests-java11 59.23% <95.23%> (+0.19%) ⬆️
unit-tests-java17 58.69% <95.23%> (+0.17%) ⬆️
unit-tests-java21 58.70% <95.23%> (+0.18%) ⬆️
unit-tests-java25 58.66% <95.23%> (+0.18%) ⬆️
unit-tests-java8 59.24% <95.23%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@014-code
014-code force-pushed the fix/triple-rest-form-decoder-cleanup branch from adef7c4 to 84dfec2 Compare August 2, 2026 02:40
@014-code
014-code force-pushed the fix/triple-rest-form-decoder-cleanup branch from 84dfec2 to e506c6c Compare August 2, 2026 02:56

@LI123456mo LI123456mo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @zrlw , have tried reviewing this PR which fixes the issue . But , there is also another PR #16412 which also targets the same issue , can you help review that one so that we compare the two

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Triple REST does not clean up HttpPostRequestDecoder after a form request completes

3 participants