Notify listeners on applySnapshot
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ShardDataTree.java
index ed7e9bb8d60567e23da377c28d0e64012f915501..bf3b200825bc0c07c2283e7ceaf5d0c25363561a 100644 (file)
@@ -208,7 +208,10 @@ public class ShardDataTree extends ShardDataTreeTransactionParent {
 
         final DataTreeModification unwrapped = unwrap(mod);
         dataTree.validate(unwrapped);
-        dataTree.commit(dataTree.prepare(unwrapped));
+        DataTreeCandidateTip candidate = dataTree.prepare(unwrapped);
+        dataTree.commit(candidate);
+        notifyListeners(candidate);
+
         LOG.debug("{}: state snapshot applied in %s", logContext, elapsed);
     }
 
@@ -283,7 +286,7 @@ public class ShardDataTree extends ShardDataTreeTransactionParent {
         } else if (payload instanceof DataTreeCandidatePayload) {
             applyRecoveryCandidate(((DataTreeCandidatePayload) payload).getCandidate());
         } else {
-            LOG.warn("{}: ignoring unhandled payload {}", logContext, payload);
+            LOG.debug("{}: ignoring unhandled payload {}", logContext, payload);
         }
     }