Seal only modified modifications
[controller.git] / 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();
     }