commit | a2789a9f811954be8f20d235fbdb3515599518d0 | [log] [tgz] |
---|---|---|
author | Charles Chan <rascov@gmail.com> | Thu Jul 05 16:46:11 2018 -0700 |
committer | Thomas Vachuska <tom@opennetworking.org> | Fri Jul 06 16:12:36 2018 +0000 |
tree | 72cdd2678a1330d1283cf8d2f8f11e7112e3c85d | |
parent | 2c0b10f7dda739ff60ee2b9a0824929f4f0206a8 [diff] |
Bugfix: DistributedPacketStore does not notify delegate in some cases Assuming we execute two put operations with the same key but different value, i.e. put {key, value1} and put {key, value2} Both put should return true Change-Id: Iad8d68fa68e7b4ce37cdd3634d36144aa1b21afe (cherry picked from commit fb92a5a50b6ce2abe94ca807937207210fd094cb)
diff --git a/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java b/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java index 1c02da9..1043c45 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/packet/impl/DistributedPacketStore.java
@@ -224,9 +224,7 @@ } private boolean addInternal(PacketRequest request) { - Collection<? extends PacketRequest> values = - Versioned.valueOrNull(requests.putAndGet(key(request), request)); - return values.size() == 1; + return requests.put(key(request), request); } private void remove(PacketRequest request) {