commit | c70b7e533c7735fe5c7eb155cd2a608d83cf20a8 | [log] [tgz] |
---|---|---|
author | Sithara Punnassery <psithara@gmail.com> | Thu Aug 10 14:28:08 2017 -0700 |
committer | Sithara Punnassery <psithara@gmail.com> | Fri Aug 11 00:54:53 2017 +0000 |
tree | f988768bea4ddc6f695d374cd39abdf45d787e0a | |
parent | 1e534c3683e9ba9a54e65b33afb93035b86124e7 [diff] |
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