Skip to content

Fix CompositeInputStream close handling#16305

Open
skt-shinyruo wants to merge 1 commit into
apache:3.3from
skt-shinyruo:fix-composite-input-stream-close
Open

Fix CompositeInputStream close handling#16305
skt-shinyruo wants to merge 1 commit into
apache:3.3from
skt-shinyruo:fix-composite-input-stream-close

Conversation

@skt-shinyruo
Copy link
Copy Markdown

What is the purpose of the change

Fixes #16117.

Brief changelog

  • Continue closing remaining underlying streams when one InputStream.close() throws IOException.
  • Preserve the first IOException and attach later close failures as suppressed exceptions.
  • Add regression tests for closing all streams and retaining suppressed exceptions.

Verifying this change

  • mvn -pl dubbo-remoting/dubbo-remoting-http12 test

@zrlw
Copy link
Copy Markdown
Contributor

zrlw commented Jun 2, 2026

Hope this one will be approved by 2+ committers,
#16118 did the same thing.

Copy link
Copy Markdown
Contributor

@zrlw zrlw left a comment

Choose a reason for hiding this comment

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

LGTM

@skt-shinyruo skt-shinyruo force-pushed the fix-composite-input-stream-close branch from d60497c to bbde4be Compare June 2, 2026 07:00
@skt-shinyruo
Copy link
Copy Markdown
Author

Thanks for reviewing!

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.77%. Comparing base (b65573e) to head (bbde4be).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16305      +/-   ##
============================================
- Coverage     60.80%   60.77%   -0.04%     
- Complexity    11766    11770       +4     
============================================
  Files          1953     1953              
  Lines         89188    89196       +8     
  Branches      13454    13457       +3     
============================================
- Hits          54235    54211      -24     
- Misses        29391    29412      +21     
- Partials       5562     5573      +11     
Flag Coverage Δ
integration-tests-java21 32.11% <33.33%> (-0.02%) ⬇️
integration-tests-java8 32.24% <33.33%> (+<0.01%) ⬆️
samples-tests-java21 32.21% <33.33%> (+0.02%) ⬆️
samples-tests-java8 29.74% <11.11%> (-0.12%) ⬇️
unit-tests-java11 59.01% <100.00%> (-0.04%) ⬇️
unit-tests-java17 58.52% <100.00%> (-0.01%) ⬇️
unit-tests-java21 58.50% <100.00%> (+0.01%) ⬆️
unit-tests-java25 58.43% <100.00%> (-0.05%) ⬇️
unit-tests-java8 59.02% <100.00%> (+0.02%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] CompositeInputStream.close() may leak underlying streams when one close() throws

3 participants