Fix for ONOS-4429
Change-Id: I41b56244b2d991eb68cded6e3b15cdc67ef7fa39
Showing
1 changed file
with
1 additions
and
4 deletions
... | @@ -339,11 +339,8 @@ public class EventuallyConsistentMapImpl<K, V> | ... | @@ -339,11 +339,8 @@ public class EventuallyConsistentMapImpl<K, V> |
339 | checkNotNull(value, ERROR_NULL_VALUE); | 339 | checkNotNull(value, ERROR_NULL_VALUE); |
340 | 340 | ||
341 | MapValue<V> newValue = new MapValue<>(value, timestampProvider.apply(key, value)); | 341 | MapValue<V> newValue = new MapValue<>(value, timestampProvider.apply(key, value)); |
342 | - // Before mutating local map, ensure the update can be serialized without errors. | ||
343 | - // This prevents replica divergence due to serialization failures. | ||
344 | - UpdateEntry<K, V> update = serializer.copy(new UpdateEntry<K, V>(key, newValue)); | ||
345 | if (putInternal(key, newValue)) { | 342 | if (putInternal(key, newValue)) { |
346 | - notifyPeers(update, peerUpdateFunction.apply(key, value)); | 343 | + notifyPeers(new UpdateEntry<K, V>(key, newValue), peerUpdateFunction.apply(key, value)); |
347 | notifyListeners(new EventuallyConsistentMapEvent<>(mapName, PUT, key, value)); | 344 | notifyListeners(new EventuallyConsistentMapEvent<>(mapName, PUT, key, value)); |
348 | } | 345 | } |
349 | } | 346 | } | ... | ... |
-
Please register or login to post a comment