ECMap: Avoid new mapvalue if raw values are equal

Change-Id: I84fa9bcada9ea9da1e0c43f61106a9d91fc60e62
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java
index 97711af..ffbb0c5 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/EventuallyConsistentMapImpl.java
@@ -416,6 +416,10 @@
         MapValue<V> computedValue = items.compute(serializer.copy(key), (k, mv) -> {
             previousValue.set(mv);
             V newRawValue = recomputeFunction.apply(key, mv == null ? null : mv.get());
+            if (mv != null && Objects.equals(newRawValue, mv.get())) {
+                // value was not updated
+                return mv;
+            }
             MapValue<V> newValue = new MapValue<>(newRawValue, timestampProvider.apply(key, newRawValue));
             if (mv == null || newValue.isNewerThan(mv)) {
                 updated.set(true);