sendSnapshotChunk(followerActor, followerLogInfo, nextSnapshotChunk, nextChunkIndex, serverConfig);
+ log.debug("{}: InstallSnapshot sent to follower {}, Chunk: {}/{}", logName(), followerActor.path(),
+ installSnapshotState.getChunkIndex(), installSnapshotState.getTotalChunks());
+
} catch (IOException e) {
- throw new RuntimeException(e);
+ log.warn("{}: Unable to send chunk: {}/{}. Reseting snapshot progress. Snapshot state: {}", logName(),
+ installSnapshotState.getChunkIndex(), installSnapshotState.getTotalChunks(),
+ installSnapshotState);
+ installSnapshotState.reset();
}
-
- log.debug("{}: InstallSnapshot sent to follower {}, Chunk: {}/{}", logName(), followerActor.path(),
- installSnapshotState.getChunkIndex(), installSnapshotState.getTotalChunks());
}
}
*/
package org.opendaylight.controller.cluster.raft.behaviors;
+import com.google.common.base.MoreObjects;
import com.google.common.base.Stopwatch;
import com.google.common.io.ByteSource;
import java.io.IOException;
int getLastChunkHashCode() {
return lastChunkHashCode;
}
+
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(this)
+ .add("snapshotChunkSize", snapshotChunkSize)
+ .add("offset", offset)
+ .add("replyReceivedForOffset", replyReceivedForOffset)
+ .add("replyStatus", replyStatus)
+ .add("chunkIndex", chunkIndex)
+ .add("totalChunks", totalChunks)
+ .add("lastChunkHashCode", lastChunkHashCode)
+ .add("nextChunkHashCode", nextChunkHashCode)
+ .add("snapshotSize", snapshotSize)
+ .add("chunkTimer", chunkTimer)
+ .toString();
+ }
}