commit | 4e7de42b97396299db2258c41fce465ccc7ac5ab | [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 17:38:56 2018 +0000 |
tree | f6e2ed90260eea7cd5f18c80f17a9e7a3738551c | |
parent | 40ecef3be039f13f81dd5b4b1f49a372b6fbe0c4 [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) {