-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Milestone
Description
Describe the bug
当多个线程同时向同一服务注册同一集群时,该集群会执行多个健康检查任务。com.alibaba.nacos.naming.core.Cluster类代码
很明显,该init方法不是原子操作,存在多个线程同时读取inited变量为false的情况,则会将同一健康检查任务执行多次。
Expected behavior
同一集群实例,只应该初始化一次
Acutally behavior
同一集群实例,可能初始化多次
How to Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Desktop (please complete the following information):
- OS: [e.g. Centos]
- Version [e.g. nacos-server 1.3.1, nacos-client 1.3.1]
- Module [e.g. naming/config]
- SDK [e.g. original, spring-cloud-alibaba-nacos, dubbo]
Additional context
Add any other context about the problem here.