haoyann edited a comment on issue #8821:
URL: https://github.com/apache/dubbo/issues/8821#issuecomment-959471230
@zrlw Hi,我认为这不是好的解决方案,这样会有以下几个问题
1. `AbstractConfiguratorListener` 本身就是监听的配置的变更,ADDED 事件不做任何处理,逻辑上不太通;
2. 现在 zookeeper 变动配置只能使用 `zkClient.setData().forPath(path,
value.getBytes());` 的形式,`zkClient.create()` 则是 ADDED 事件,导致发布无效;
3. 当 Nacos 作为配置中心的时候,新增配置无效,逻辑如下。
```
private ConfigChangeType getChangeType(String configInfo, String
oldValue) {
if (StringUtils.isBlank(configInfo)) {
return ConfigChangeType.DELETED;
}
if (StringUtils.isBlank(oldValue)) {
return ConfigChangeType.ADDED;
}
return ConfigChangeType.MODIFIED;
}
```
回到这个问题本身,首先应该排查一下为什么会有 IP 字符串写入到这里,dubbo
监听的配置路径都是固定。即使有错误的字符串的输入,应该在解析那里中断流程,而不是在上游中断流程。
--
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]