Skip to content

Add Affinity Router #14787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 26, 2025
Merged

Add Affinity Router #14787

merged 11 commits into from
Jun 26, 2025

Conversation

wcy666103
Copy link
Contributor

What is the purpose of the change?

Add affinity router rule v3.1 refer here #14455

Brief changelog

dubbo/config/group/{$name}.affinity-router

configVersion: v3.1
scope: service # Or application
key: service.apache.com
enabled: true
runtime: true
affinityAware:
  key: region
  ratio: 20

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?

@zrlw zrlw added help wanted Everything needs help from contributors type/proposal Everything you want Dubbo have type/enhancement Everything related with code enhancement or performance labels Jun 24, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2025

Codecov Report

Attention: Patch coverage is 45.10870% with 101 lines in your changes missing coverage. Please review.

Project coverage is 60.88%. Comparing base (a0b6e47) to head (458d804).

Files with missing lines Patch % Lines
...c/cluster/router/affinity/AffinityStateRouter.java 50.00% 28 Missing and 6 partials ⚠️
...affinity/config/AffinityListenableStateRouter.java 47.16% 19 Missing and 9 partials ⚠️
...ffinity/config/AffinityProviderAppStateRouter.java 0.00% 27 Missing ⚠️
...uter/affinity/config/model/AffinityRouterRule.java 84.21% 2 Missing and 1 partial ⚠️
...uter/affinity/config/model/AffinityRuleParser.java 66.66% 2 Missing and 1 partial ⚠️
...er/router/affinity/AffinityStateRouterFactory.java 0.00% 2 Missing ⚠️
.../config/AffinityProviderAppStateRouterFactory.java 0.00% 2 Missing ⚠️
...nity/config/AffinityServiceStateRouterFactory.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #14787      +/-   ##
============================================
- Coverage     60.91%   60.88%   -0.04%     
- Complexity       12    11460   +11448     
============================================
  Files          1898     1907       +9     
  Lines         86477    86661     +184     
  Branches      12965    12988      +23     
============================================
+ Hits          52678    52762      +84     
- Misses        28358    28444      +86     
- Partials       5441     5455      +14     
Flag Coverage Δ
integration-tests-java17 32.95% <0.00%> (-0.09%) ⬇️
integration-tests-java8 33.06% <0.00%> (-0.07%) ⬇️
samples-tests-java17 31.39% <0.00%> (-0.06%) ⬇️
samples-tests-java8 29.28% <0.00%> (+0.03%) ⬆️
unit-tests 58.80% <45.10%> (-0.03%) ⬇️

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.

@zrlw zrlw merged commit 3effe10 into apache:3.3 Jun 26, 2025
29 checks passed
zrlw added a commit that referenced this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Everything needs help from contributors type/enhancement Everything related with code enhancement or performance type/proposal Everything you want Dubbo have
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants