fix(registry): restore invoker URL de-duplication and keep #16108 protocol-matching fix#16133
Open
onceMisery wants to merge 4 commits intoapache:3.2from
Open
fix(registry): restore invoker URL de-duplication and keep #16108 protocol-matching fix#16133onceMisery wants to merge 4 commits intoapache:3.2from
onceMisery wants to merge 4 commits intoapache:3.2from
Conversation
added 3 commits
March 3, 2026 12:49
… coexist on the same Nacos namespace
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.2 #16133 +/- ##
============================================
- Coverage 41.27% 36.23% -5.04%
+ Complexity 10492 9180 -1312
============================================
Files 1652 1652
Lines 71492 71497 +5
Branches 10175 10178 +3
============================================
- Hits 29508 25907 -3601
- Misses 37847 41658 +3811
+ Partials 4137 3932 -205
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change?
This PR fixes a regression introduced while addressing #16108.
Background
During the #16108 fix, URL de-duplication in
ServiceDiscoveryRegistryDirectory#refreshInvoker()was accidentally removed.If registry sends duplicated instance URLs in one notification batch,
toInvokers()may callprotocol.refer()multiple times for the same endpoint before map finalization. The laterput()overwrites earlier entries innewUrlInvokerMap, which can leave previously created invokers untracked and not destroyed.This regresses the behavior fixed by commit
a35af2742a(Remove duplicated invokers in registry notification).What is changed
refreshInvoker()invokerUrls.stream().distinct()beforetoInvokers().rest.nullor non-REST.SpringCloudServiceInstanceNotificationCustomizerTestverifies protocol-match behavior and mixed-instance handling.ServiceDiscoveryRegistryDirectoryTestverifies duplicated URLs in one notify batch are de-duplicated and do not trigger repeated refer flow.Why this is needed
GitHub Issue
Checklist