zrlw edited a comment on issue #9239:
URL: https://github.com/apache/dubbo/issues/9239#issuecomment-964884504
dubbo-samples的dubbo-samples-applevel-override就能稳定重现:
1. CuratorZookeeperClient的344行设置断点
```
} else if (childData.getStat().getVersion() == 0) {
content = new String(childData.getData(), CHARSET);
eventType = EventType.NodeCreated; <== line 344 set
breakpoint here
} else {
```
2. 启动zk服务,端口2181
3. debug启动BasicProvider, 启动参数加dubbo.port=20880
4. debug启动BasicProvider, 启动参数加dubbo.port=20881
5. 在ZKTools的66行设置断点:
```
if (client.checkExists().forPath(path) == null) {
client.create().creatingParentsIfNeeded().withMode(CreateMode.PERSISTENT).forPath(path);
<== line 66 set breakpoint
}
```
6. debug执行DemoServiceIT单元测试
7.
一直执行到DemoServiceIT到达ZKTools的66行断点处(出现CuratorZookeeperClient的344行断点时继续执行即可),之后单步执行完66行,两个provider都会再次执行到CuratorZookeeperClient的344行的断点处,此时查看两个provider的事件content内容就会看到里面都只是一个ip地址。
重复上述测试要先重新debug启动两个provider,再debug启动DemoServiceIT,否则到不了ZKTools的66行断点。
--
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]