Seal only modified modifications 15/53515/2
authorJakub Morvay <jmorvay@cisco.com>
Sat, 18 Mar 2017 08:44:48 +0000 (09:44 +0100)
committerJakub Morvay <jmorvay@cisco.com>
Mon, 20 Mar 2017 08:22:02 +0000 (09:22 +0100)
Change-Id: I839eaebbf367a44b17595070fdea76d1f879f204
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardModification.java

index 2bd0dae..4a36c38 100644 (file)
@@ -57,7 +57,9 @@ public class DistributedShardModification extends WriteableNodeWithSubshard {
     }
 
     DOMStoreThreePhaseCommitCohort seal() {
-        childShards.values().forEach(ForeignShardModificationContext::ready);
+        childShards.values().stream().filter(ForeignShardModificationContext::isModified)
+                .forEach(ForeignShardModificationContext::ready);
+
         return context.ready();
     }