You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "redoom (via GitHub)" <gi...@apache.org> on 2025/12/02 12:48:06 UTC

[PR] fix:the Configuration Cluster and retries [dubbo]

redoom opened a new pull request, #15821:
URL: https://github.com/apache/dubbo/pull/15821

   ## Problem
   Previously, Dubbo's cluster fault-tolerance strategy could only be configured on the consumer side via `@DubboReference(cluster = "...")`. Provider-side configuration via `@DubboService(cluster = "...")` was ignored.
   
   ## Solution
   Modified `RegistryProtocol` to support provider-side cluster configuration with consumer-side override capability:
   - Check if consumer has explicitly configured cluster parameter
   - If not, fetch cluster configuration from provider's URL metadata
   - Consumer config takes precedence over provider config
   
   
   ## Usage Example
   
   ### Provider side
   ```java
   @DubboService(cluster = "failsafe")
   public class GreetingServiceImpl implements GreetingService {
       @Override
       public String sayHello(String name) {
           return "Hello " + name;
       }
   }
   ```
   
   ### Consumer side (will use provider's failsafe strategy)
   ```java
   @DubboReference
   private GreetingService greetingService;
   ```
   
   ### Consumer override (explicit config takes precedence)
   ```java
   @DubboReference(cluster = "failover")
   private GreetingService greetingService;
   ```
   
   ## Priority Order
   1. Consumer-side explicit configuration (highest priority)
   2. Provider-side configuration (fallback)
   3. Default strategy: failover
   
   ## Related Issues
   https://github.com/apache/dubbo/issues/15668#issuecomment-3581754102


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix:the Configuration Cluster and retries [dubbo]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #15821:
URL: https://github.com/apache/dubbo/pull/15821#issuecomment-3601990871

   ## [Codecov](https://app.codecov.io/gh/apache/dubbo/pull/15821?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `69.23077%` with `4 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 32.08%. Comparing base ([`7b48706`](https://app.codecov.io/gh/apache/dubbo/commit/7b48706491665b98dd22284c2c254ea214cd6f30?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`f1047d6`](https://app.codecov.io/gh/apache/dubbo/commit/f1047d6dc6da97fbcc2b8c3438ad64715f70524c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 3 commits behind head on 3.3.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/dubbo/pull/15821?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...e/dubbo/registry/integration/RegistryProtocol.java](https://app.codecov.io/gh/apache/dubbo/pull/15821?src=pr&el=tree&filepath=dubbo-registry%2Fdubbo-registry-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fdubbo%2Fregistry%2Fintegration%2FRegistryProtocol.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9SZWdpc3RyeVByb3RvY29sLmphdmE=) | 69.23% | [2 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/dubbo/pull/15821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (7b48706) and HEAD (f1047d6). Click for more details.
   > 
   > <details><summary>HEAD has 7 uploads less than BASE</summary>
   >
   >| Flag | BASE (7b48706) | HEAD (f1047d6) |
   >|------|------|------|
   >|integration-tests-java21|1|0|
   >|integration-tests-java8|1|0|
   >|unit-tests-java25|1|0|
   >|unit-tests-java11|1|0|
   >|unit-tests-java21|1|0|
   >|unit-tests-java8|1|0|
   >|unit-tests-java17|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##                3.3   #15821       +/-   ##
   =============================================
   - Coverage     60.75%   32.08%   -28.68%     
   + Complexity    11695    10128     -1567     
   =============================================
     Files          1938     1937        -1     
     Lines         88679    88670        -9     
     Branches      13386    13307       -79     
   =============================================
   - Hits          53877    28448    -25429     
   - Misses        29270    56050    +26780     
   + Partials       5532     4172     -1360     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/dubbo/pull/15821/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [integration-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/15821/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/15821/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [samples-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/15821/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `32.04% <69.23%> (-0.03%)` | :arrow_down: |
   | [samples-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/15821/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `29.69% <69.23%> (+0.04%)` | :arrow_up: |
   | [unit-tests-java11](https://app.codecov.io/gh/apache/dubbo/pull/15821/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit-tests-java17](https://app.codecov.io/gh/apache/dubbo/pull/15821/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/15821/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit-tests-java25](https://app.codecov.io/gh/apache/dubbo/pull/15821/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/15821/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/dubbo/pull/15821?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix:the Configuration Cluster and retries [dubbo]

Posted by "redoom (via GitHub)" <gi...@apache.org>.
redoom commented on PR #15821:
URL: https://github.com/apache/dubbo/pull/15821#issuecomment-3783803836

   @zrlw  Sorry for the late reply.
   I’ve reviewed the three added tests. They cover:
   
     - provider cluster used when the consumer doesn’t set one,
     - consumer cluster honored when explicitly set,
     - consumer cluster overriding provider hints.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org