You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/18 02:02:12 UTC

[GitHub] [dubbo] changfubai commented on a change in pull request #8834: [master] add zookeeper node data created event check

changfubai commented on a change in pull request #8834:
URL: https://github.com/apache/dubbo/pull/8834#discussion_r711423612



##########
File path: dubbo-configcenter/dubbo-configcenter-zookeeper/src/main/java/org/apache/dubbo/configcenter/support/zookeeper/CacheListener.java
##########
@@ -98,7 +98,9 @@ private String getGroup(String path) {
     @Override
     public void dataChanged(String path, Object value, EventType eventType) {
         ConfigChangeType changeType;
-        if (value == null) {
+        if (EventType.NodeCreated.equals(eventType)) {
+            changeType = ConfigChangeType.ADDED;
+        } if (value == null) {

Review comment:
       else if  (value == null) 
   
   漏了个else,逻辑完全不一样了。




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org