BUG-8159: add payload debugs
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ShardSnapshotCohort.java
index 93e1d873579f0c02446b666f897cfcae640db525..c8f62e2a124817a156c8fa3ef434a7fbe373bf41 100644 (file)
@@ -65,7 +65,10 @@ class ShardSnapshotCohort implements RaftActorSnapshotCohort {
     @Override
     public void createSnapshot(final ActorRef actorRef, final Optional<OutputStream> installSnapshotStream) {
         // Forward the request to the snapshot actor
-        ShardSnapshotActor.requestSnapshot(snapshotActor, store.takeStateSnapshot(), installSnapshotStream, actorRef);
+        final ShardDataTreeSnapshot snapshot = store.takeStateSnapshot();
+        log.debug("{}: requesting serialization of snapshot {}", logId, snapshot);
+
+        ShardSnapshotActor.requestSnapshot(snapshotActor, snapshot, installSnapshotStream, actorRef);
     }
 
     @Override
@@ -94,7 +97,7 @@ class ShardSnapshotCohort implements RaftActorSnapshotCohort {
     }
 
     @Override
-    public State deserializeSnapshot(ByteSource snapshotBytes) throws IOException {
+    public State deserializeSnapshot(final ByteSource snapshotBytes) throws IOException {
         try (final ObjectInputStream in = new ObjectInputStream(snapshotBytes.openStream())) {
             return new ShardSnapshotState(ShardDataTreeSnapshot.deserialize(in));
         }