commit | 9052b209276e703781513daeb004b75217310889 | [log] [tgz] |
---|---|---|
author | Jordan Halterman <jordan@opennetworking.org> | Tue Aug 01 09:41:32 2017 -0700 |
committer | Thomas Vachuska <tom@opennetworking.org> | Tue Aug 01 22:01:58 2017 +0000 |
tree | 9b63eb42dbc699798285cc798d361ae632c26377 | |
parent | 75ef9f5c510edffcc1ff9886c5ab49ab061edea7 [diff] |
Remove equality check when replacing DocumentTree values by version to prevent conflicts with optimistic locks Change-Id: I1325955828a562dc29261abdd62fa37463f84625
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/DefaultDocumentTree.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/DefaultDocumentTree.java index 295635d..526799c 100644 --- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/DefaultDocumentTree.java +++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/DefaultDocumentTree.java
@@ -139,10 +139,8 @@ checkRootModification(path); DocumentTreeNode<V> node = getNode(path); if (node != null && node.value() != null && node.value().version() == version) { - if (!Objects.equals(newValue, node.value().value())) { - set(path, newValue); - return true; - } + set(path, newValue); + return true; } return false; }