ONOS-6906

Dynamic Config: Update events are missed

Change-Id: Ibe8ac3936e1a0d868ac4952fecb0a39061ca343d
This commit is contained in:
Sithara Punnassery 2017-08-10 14:28:08 -07:00
parent 1e534c3683
commit c70b7e533c

View File

@ -197,9 +197,11 @@ public class DistributedDynamicConfigStore
}
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