eye-gu opened a new issue, #3316:
URL: https://github.com/apache/dubbo-go/issues/3316

   ### ✅ 验证清单
   
   - [x] 🔍 我已经搜索过 [现有 
Issues](https://github.com/apache/dubbo-go/issues),确信这不是重复问题
   
   ### 🚀 Go 版本
   
   1.25
   
   ### 📦 Dubbo-go 版本
   
   develop
   
   ### 🖥️ 服务端配置
   
   _No response_
   
   ### 💻 客户端配置
   
   _No response_
   
   ### 🌐 协议配置
   
   _No response_
   
   ### 📋 注册中心配置
   
   _No response_
   
   ### 💾 操作系统
   
   🍎 macOS
   
   ### 📝 Bug 描述
   
   
https://github.com/apache/dubbo-go/blob/ea93b8a9e1c0a9b8b05e786d955ab4f8aeaa221d/cluster/loadbalance/consistenthashing/loadbalance.go#L41
   
   cluster/loadbalance/consistenthashing/loadbalance.go 中 selectors 是包级全局 map,在 
Select() 方法中被多 goroutine 并发读写,无任何锁保护
   
   ### 🔄 重现步骤
   
   多个 goroutine 同时调用 conshashLoadBalance.Select()
   
   ### ✅ 预期行为
   
   并发调用 Select() 正常返回 invoker,无 panic
   
   ### ❌ 实际行为
   
   并发读写map错误
   
   ### 💡 可能的解决方案
   
   使用 sync.RWMutex 进行保护. 如果方案可行,我可以提交pr


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to