Skip to content

Fix Triple gRPC decoder handoff - #16416

Open
Anon2Tokyo wants to merge 1 commit into
apache:3.3from
Anon2Tokyo:issue-16414-grpc-decoder-handoff
Open

Fix Triple gRPC decoder handoff#16416
Anon2Tokyo wants to merge 1 commit into
apache:3.3from
Anon2Tokyo:issue-16414-grpc-decoder-handoff

Conversation

@Anon2Tokyo

Copy link
Copy Markdown

What is the purpose of the change?

Fixes #16414.

This change fixes the gRPC no-stub method discovery path for Triple streaming requests. The lazy method discovery listener now reuses the stream's existing StreamingDecoder instead of creating a temporary GrpcStreamingDecoder, so buffered bytes from a subsequent message are preserved when the listener switches to the resolved business handler.

The close callback on the temporary method-discovery listener is also made a no-op because it only exists to resolve the method descriptor and should not close the actual request stream.

A regression test covers a DATA-frame layout where the first decode contains one complete gRPC message followed by the prefix of the next message, then verifies the second message is still decoded after the listener switch.

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. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

Test:

mvn.cmd -pl dubbo-rpc/dubbo-rpc-triple -Dtest=GrpcStreamingDecoderTest test

@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.90%. Comparing base (3a30432) to head (d4ea6b3).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16416      +/-   ##
============================================
+ Coverage     60.87%   60.90%   +0.02%     
  Complexity    11766    11766              
============================================
  Files          1953     1953              
  Lines         89273    89272       -1     
  Branches      13473    13473              
============================================
+ Hits          54346    54369      +23     
+ Misses        29333    29314      -19     
+ Partials       5594     5589       -5     
Flag Coverage Δ
integration-tests-java21 32.08% <100.00%> (-0.06%) ⬇️
integration-tests-java8 32.21% <100.00%> (+<0.01%) ⬆️
samples-tests-java21 32.17% <0.00%> (-0.03%) ⬇️
samples-tests-java8 29.81% <0.00%> (+0.02%) ⬆️
unit-tests-java11 59.11% <100.00%> (-0.01%) ⬇️
unit-tests-java17 58.64% <100.00%> (-0.01%) ⬇️
unit-tests-java21 58.61% <100.00%> (+<0.01%) ⬆️
unit-tests-java25 58.56% <100.00%> (+<0.01%) ⬆️
unit-tests-java8 59.14% <100.00%> (-0.01%) ⬇️

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.

@Anon2Tokyo Anon2Tokyo changed the title Fix Triple gRPC decoder handoff Fix Triple gRPC decoder handoff(#16414) Aug 7, 2026
@Anon2Tokyo Anon2Tokyo changed the title Fix Triple gRPC decoder handoff(#16414) Fix Triple gRPC decoder handoff Aug 7, 2026
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.

[Triple][3.3.6] First client-streaming call after consumer restart may fail with malformed gRPC frame and IllegalReferenceCountException

2 participants