-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Nacos+SofaRpc 更新订阅端监听器 并发疑问 #1380
Labels
remind
To be further discussed
Comments
粗看了下,是会有这个隐患 |
如何解决呢?升级版本? |
@symon-lin 这应该是个 bug,当多个 Consumer 共用一个 NacosRegistry 实例时会发生。一种解决方案是 providerObserver 的初始化可以放到 init 方法中去。后续会去修复这个问题,如果感兴趣的话,可以参与贡献。如果你自己的生产代码需要立马修复,可以写个nacos 的 Extension 去覆盖 sofarpc 的实现。 |
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Jan 17, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Jan 17, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Jan 17, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Feb 27, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Feb 27, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Mar 1, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Mar 1, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Mar 1, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Mar 4, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Mar 4, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Mar 11, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Mar 12, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Mar 12, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Mar 12, 2024
wangchengming666
pushed a commit
to wangchengming666/sofa-rpc
that referenced
this issue
Mar 22, 2024
support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes fix support sofa registry kubernetes fix KubernetesRegistryHelper support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support k8s registry support k8s registry update rpc version to 5.13.0-SNAPSHOT (sofastack#1396) Co-authored-by: liujianjun.ljj <liujianjun.ljj@antgroup.com> optimize UserThreadPoolManager (sofastack#1390) Co-authored-by: 呈铭 <beck.wcm@antgroup.com> fix sofastack#1380, create NacosRegistryProviderObserver when init method is executed (sofastack#1401) * fix sofastack#1380 * fix sofastack#1380 --------- Co-authored-by: 呈铭 <beck.wcm@antgroup.com> support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes support sofa registry kubernetes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your question
场景:nacos+sofa的集成场景。
代码入口:com.alipay.sofa.rpc.registry.nacos.NacosRegistry#subscribe
上面的代码中,
providerObserver = new NacosRegistryProviderObserver();
没有对providerObserver
进行加锁控制,是否会出现并发的情况下(比如:多模块并行启动),存在多个服务订阅端,然后前面的一个Consumer创建了Observer类,然后后面的Consumer也创建了Observer类并进行覆盖,导致前面的Consumer listener丢失的情况。Environment
java -version
): 1.8.0_332uname -a
): Linux statement-group2-6c7c5df77d-vcqs4 5.4.247-162.350.amzn2.aarch64 Add jacoco maven plugin for code coverage. #1 SMP Tue Jun 27 22:03:50 UTC 2023 aarch64 GNU/LinuxThe text was updated successfully, but these errors were encountered: