Add debug to pinpoint lastApplied movement
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / RaftActorRecoverySupport.java
index a31bf4bf41002311c28352cfac8bdfa2dd768c55..1b9343c1f3ff569b378c379f3b0ef1c91c7773d3 100644 (file)
@@ -110,19 +110,7 @@ class RaftActorRecoverySupport {
 
         initRecoveryTimer();
 
-        Object snapshotObj = offer.snapshot();
-        Snapshot snapshot;
-        if (snapshotObj instanceof org.opendaylight.controller.cluster.raft.Snapshot) {
-            org.opendaylight.controller.cluster.raft.Snapshot legacy =
-                    (org.opendaylight.controller.cluster.raft.Snapshot)snapshotObj;
-            snapshot = Snapshot.create(cohort.deserializePreCarbonSnapshot(legacy.getState()),
-                    legacy.getUnAppliedEntries(), legacy.getLastIndex(), legacy.getLastTerm(),
-                    legacy.getLastAppliedIndex(), legacy.getLastAppliedTerm(),
-                    legacy.getElectionTerm(), legacy.getElectionVotedFor(), legacy.getServerConfiguration());
-            hasMigratedDataRecovered = true;
-        } else {
-            snapshot = (Snapshot) offer.snapshot();
-        }
+        Snapshot snapshot = (Snapshot) offer.snapshot();
 
         for (ReplicatedLogEntry entry: snapshot.getUnAppliedEntries()) {
             if (isMigratedPayload(entry)) {