Skip to content

fix(triple): align unary default timeout with Dubbo protocol - #16598

Open
arimu1 wants to merge 1 commit into
apache:3.3from
arimu1:fix/14151-triple-default-timeout
Open

arimu1 wants to merge 1 commit into
apache:3.3from
arimu1:fix/14151-triple-default-timeout

Conversation

@arimu1

@arimu1 arimu1 commented Nov 22, 2026 •

Copy link
Copy Markdown

What is the purpose of the change?

TripleInvoker.invokeUnary passed a hardcoded 3000 fallback into RpcUtils.calculateTimeout. With no timeout on the URL, invocation, or RpcContext, a Triple unary call waited 3 seconds while DubboInvoker and InjvmInvoker wait for CommonConstants.DEFAULT_TIMEOUT (1000ms).

This change passes CommonConstants.DEFAULT_TIMEOUT as that fallback, matching the Java Dubbo protocol. An explicit URL or invocation timeout still wins. DubboInvoker is unchanged.

Fixes #14151

Verified on Temurin 21.0.12+8 (compiler release 8):

./mvnw -pl dubbo-rpc/dubbo-rpc-triple -am test -Dtest=TripleInvokerTest -Dsurefire.failIfNoSpecifiedTests=false

TripleInvokerTest: Tests run: 2, Failures: 0, Errors: 0, Skipped: 0. The extra Surefire flag keeps dependency modules that do not contain this test from failing the reactor.

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?

TripleInvoker.invokeUnary passed a hardcoded 3000ms fallback into
RpcUtils.calculateTimeout. With no timeout on the URL, invocation, or
RpcContext, a Triple unary call waited 3s while Dubbo and injvm used
DEFAULT_TIMEOUT (1000ms). An explicit URL timeout still wins.

Fixes apache#14151
@codecov-commenter

codecov-commenter commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.20%. Comparing base (d809bb1) to head (4bf0aa7).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16598      +/-   ##
============================================
+ Coverage     61.17%   61.20%   +0.02%     
- Complexity       30    11765   +11735     
============================================
  Files          1953     1953              
  Lines         89359    89360       +1     
  Branches      13488    13487       -1     
============================================
+ Hits          54665    54692      +27     
+ Misses        29068    29050      -18     
+ Partials       5626     5618       -8     
Flag Coverage Δ
integration-tests-java21 32.15% <100.00%> (+0.04%) ⬆️
integration-tests-java8 32.23% <100.00%> (+0.02%) ⬆️
samples-tests-java21 32.13% <100.00%> (+0.06%) ⬆️
samples-tests-java8 29.65% <100.00%> (-0.02%) ⬇️
unit-tests-java11 59.48% <100.00%> (+<0.01%) ⬆️
unit-tests-java17 58.89% <100.00%> (+0.01%) ⬆️
unit-tests-java21 58.93% <100.00%> (+0.03%) ⬆️
unit-tests-java25 58.85% <100.00%> (-0.03%) ⬇️
unit-tests-java8 59.47% <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 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.

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

Could the PR need a test for invocation, or RpcContext since they are more preferenced or URL will stand in for all ? since the description is not explicit on only URL.

LGTM according to the required default behaviour

This branch has not been deployed

No deployments
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 default timeout is inconsistent with Dubbo

3 participants