ONOS-6906
Dynamic Config: Update events are missed

Change-Id: Ibe8ac3936e1a0d868ac4952fecb0a39061ca343d
diff --git a/apps/config/src/main/java/org/onosproject/config/impl/DistributedDynamicConfigStore.java b/apps/config/src/main/java/org/onosproject/config/impl/DistributedDynamicConfigStore.java
index 6fba8af..b32364e 100644
--- a/apps/config/src/main/java/org/onosproject/config/impl/DistributedDynamicConfigStore.java
+++ b/apps/config/src/main/java/org/onosproject/config/impl/DistributedDynamicConfigStore.java
@@ -197,9 +197,11 @@
     }
 
     private Boolean addKey(String path, DataNode.Type type) {
-        Boolean stat = false;
-        CompletableFuture<Boolean> ret = keystore.create(DocumentPath.from(path), type);
-        return complete(ret);
+        if (completeVersioned(keystore.get(DocumentPath.from(path))) != null) {
+            completeVersioned(keystore.set(DocumentPath.from(path), type));
+            return true;
+        }
+        return complete(keystore.create(DocumentPath.from(path), type));
     }
 
     @Override