Skip to content

Conversation

@ikhoon
Copy link
Contributor

@ikhoon ikhoon commented Nov 3, 2025

Motivation:

Subscriber.onComplete() is invoked before completionFuture is completed, so a happen-before relationship between byteStreamMessage.isOpen() and Subscriber.onComplete() cannot be guaranteed.

downstream.onComplete();
completionFuture.complete(null);

Modifications:

  • Use .whenComplete().join() to explicitly wait until InputStreamStreamMessage completes.

Result:

Closes #6483

Motivation:

`Suscriber.onComplete()` is invoked before `completionFuture` is
completed, so a happen-before relationship between them cannot be guaranteed.
https://github.com/line/armeria/blob/0d94d0df85ba9b1184c79ffdd58d3e414b2f0c7d/core/src/main/java/com/linecorp/armeria/common/stream/InputStreamStreamMessage.java#L375-L376

Modifications:

- Use `.whenComplete().join()` to explicitly wait until
  `InputStreamStreamMessage` completes.

Result:

Closes line#6483
@ikhoon ikhoon requested a review from jrhee17 as a code owner November 3, 2025 09:05
@ikhoon ikhoon added the cleanup label Nov 3, 2025
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.09%. Comparing base (8150425) to head (79a1be5).
⚠️ Report is 216 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6484      +/-   ##
============================================
- Coverage     74.46%   74.09%   -0.37%     
- Complexity    22234    22991     +757     
============================================
  Files          1963     2062      +99     
  Lines         82437    86128    +3691     
  Branches      10764    11310     +546     
============================================
+ Hits          61385    63817    +2432     
- Misses        15918    16893     +975     
- Partials       5134     5418     +284     

☔ 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.

Copy link
Contributor

@minwoox minwoox left a comment

Choose a reason for hiding this comment

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

👍

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure: com.linecorp.armeria.common.stream.InputStreamStreamMessageTest.emptyInputStream()

3 participants