// Delete all the akka snapshots as they will not be needed
persistentProvider.deleteSnapshots(new SnapshotSelectionCriteria(scala.Long.MaxValue(),
- scala.Long.MaxValue()));
+ scala.Long.MaxValue(), 0L, 0L));
// Since we cleaned out the journal, we need to re-write the current election info.
context.getTermInformation().updateAndPersist(context.getTermInformation().getCurrentTerm(),
// 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(),
replicatedLog().getSnapshotTerm(), replicatedLog().size());
}
- private boolean isServerConfigurationPayload(ReplicatedLogEntry repLogEntry){
+ private static boolean isServerConfigurationPayload(ReplicatedLogEntry repLogEntry){
return (repLogEntry.getData() instanceof ServerConfigurationPayload);
}
}