apache/dubbo

ZookeeperRegistryNotifier 无法实现多次通知合并的功能?

オープン

#11,257 opened on 2023/01/09

 (8 件のコメント) (0 件のリアクション) (1 人の担当者)Java (26,453 件のフォーク)batch import
help wantedtype/bug

Repository metrics

Stars
 (41,524 個のスター)
PR merge metrics
 (PR metrics pending)

説明

不太理解 ZookeeperRegistryNotifier 的 notify() 方法里面,为什么要进行 sleep ?

我一开始以为是这里说的【延迟通知】https://cn.dubbo.apache.org/zh/blog/2022/06/23/%e6%b5%85%e6%9e%90-dubbo-3.0-%e4%b8%ad%e6%8e%a5%e5%8f%a3%e7%ba%a7%e5%9c%b0%e5%9d%80%e6%8e%a8%e9%80%81%e6%80%a7%e8%83%bd%e7%9a%84%e4%bc%98%e5%8c%96/#%E5%BB%B6%E8%BF%9F%E9%80%9A%E7%9F%A5

但是阅读代码之后,发现应该起不到这里说的【延迟通知】的效果。

看了 org.apache.dubbo.registry.RegistryNotifier#notify 的实现,org.apache.dubbo.registry.zookeeper.ZookeeperRegistry.ZookeeperRegistryNotifier#notify 的实现的确有问题,ZookeeperRegistryNotifier实现不了【阻塞期间,多次通知的合并】

コントリビューターガイド