Skip to content
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

[3.0] Fix concurrency issues of service discovery #9684

Merged
merged 16 commits into from
Feb 23, 2022

Conversation

chickenlj
Copy link
Contributor

@chickenlj chickenlj commented Feb 15, 2022

  • Possible race conditions
    • ReferenceConfigs have the same interface but different groups or versions subscribe/subscribe at the same time.
    • Different interfaces that map to the same app list subscribe/unsubscribe at the same time.
  • Mapping initialization and change notification
    • Using file-based mapping cache to replace the one-only memory cache, most of the time, memory usage won't increase too much.
    • Load mapping from the cache to accelerate starting process
    • Async change notification to re-subscribe if mapping from remote was found changed.
  • Multiple subscription support
    • Make sure Consumer can find providers registered with multiple protocols through app-level address model

@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2022

Codecov Report

Merging #9684 (d90aa19) into 3.0 (adea101) will decrease coverage by 0.67%.
The diff coverage is 75.62%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.0    #9684      +/-   ##
============================================
- Coverage     65.73%   65.06%   -0.68%     
+ Complexity      297      293       -4     
============================================
  Files          1192     1193       +1     
  Lines         52154    52369     +215     
  Branches       7918     7930      +12     
============================================
- Hits          34285    34075     -210     
- Misses        14186    14570     +384     
- Partials       3683     3724      +41     
Impacted Files Coverage Δ
...ubbo/metadata/store/nacos/NacosMetadataReport.java 0.00% <0.00%> (ø)
...java/org/apache/dubbo/registry/NotifyListener.java 0.00% <0.00%> (ø)
.../apache/dubbo/registry/client/ServiceInstance.java 20.00% <ø> (ø)
...e/dubbo/registry/integration/DynamicDirectory.java 60.00% <0.00%> (-3.31%) ⬇️
.../registry/multicast/MulticastServiceDiscovery.java 66.66% <ø> (ø)
...src/main/java/org/apache/dubbo/rpc/RpcContext.java 39.18% <0.00%> (ø)
...n/java/org/apache/dubbo/rpc/RpcServiceContext.java 61.26% <0.00%> (-0.81%) ⬇️
...org/apache/dubbo/metadata/MappingCacheManager.java 52.17% <52.17%> (ø)
...ache/dubbo/registry/client/InstanceAddressURL.java 54.42% <55.26%> (+3.26%) ⬆️
...n/java/org/apache/dubbo/metadata/MetadataInfo.java 62.83% <65.21%> (-3.83%) ⬇️
... and 115 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update adea101...d90aa19. Read the comment docs.

@chickenlj chickenlj added the status/don’t-merge No plan to merge label Feb 18, 2022
@chickenlj chickenlj added this to the 3.0.6 milestone Feb 18, 2022
@chickenlj chickenlj merged commit 7a5d04a into apache:3.0 Feb 23, 2022
@chickenlj chickenlj removed the status/don’t-merge No plan to merge label Feb 28, 2022
@chickenlj chickenlj deleted the fix-3.0-service-discovery branch February 28, 2022 03:46
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.

2 participants