mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-23 05:11:04 +02:00
Fix for ONOS-4429
Change-Id: I41b56244b2d991eb68cded6e3b15cdc67ef7fa39
This commit is contained in:
parent
c3824e8f18
commit
a75fec47a1
@ -339,11 +339,8 @@ public class EventuallyConsistentMapImpl<K, V>
|
|||||||
checkNotNull(value, ERROR_NULL_VALUE);
|
checkNotNull(value, ERROR_NULL_VALUE);
|
||||||
|
|
||||||
MapValue<V> newValue = new MapValue<>(value, timestampProvider.apply(key, value));
|
MapValue<V> newValue = new MapValue<>(value, timestampProvider.apply(key, value));
|
||||||
// Before mutating local map, ensure the update can be serialized without errors.
|
|
||||||
// This prevents replica divergence due to serialization failures.
|
|
||||||
UpdateEntry<K, V> update = serializer.copy(new UpdateEntry<K, V>(key, newValue));
|
|
||||||
if (putInternal(key, newValue)) {
|
if (putInternal(key, newValue)) {
|
||||||
notifyPeers(update, peerUpdateFunction.apply(key, value));
|
notifyPeers(new UpdateEntry<K, V>(key, newValue), peerUpdateFunction.apply(key, value));
|
||||||
notifyListeners(new EventuallyConsistentMapEvent<>(mapName, PUT, key, value));
|
notifyListeners(new EventuallyConsistentMapEvent<>(mapName, PUT, key, value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user