Bug 2187: Persisting Actor peerIds' in snapshot
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / RaftActorRecoverySupport.java
index 0a37ef7a466725eb963aa6253b71c04b217deb10..3ac1e796741466562b9540217e6d534ceefabfa7 100644 (file)
@@ -177,6 +177,10 @@ class RaftActorRecoverySupport {
         // Apply the snapshot to the actors state
         cohort.applyRecoverySnapshot(snapshot.getState());
 
         // Apply the snapshot to the actors state
         cohort.applyRecoverySnapshot(snapshot.getState());
 
+        if (snapshot.getServerConfiguration() != null) {
+            context.updatePeerIds(snapshot.getServerConfiguration());
+        }
+
         timer.stop();
         log.info("Recovery snapshot applied for {} in {}: snapshotIndex={}, snapshotTerm={}, journal-size={}",
                 context.getId(), timer.toString(), replicatedLog().getSnapshotIndex(),
         timer.stop();
         log.info("Recovery snapshot applied for {} in {}: snapshotIndex={}, snapshotTerm={}, journal-size={}",
                 context.getId(), timer.toString(), replicatedLog().getSnapshotIndex(),