Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -771,14 +771,22 @@ public void triggerSnapshot(ConsensusGroupId groupId, boolean force) throws Cons
300000,
force ? 1 : 0);

final RaftClientReply reply;
try {
reply = server.get().snapshotManagement(request);
if (!reply.isSuccess()) {
throw new RatisRequestFailedException(reply.getException());
synchronized (raftGroupId) {
final RaftClientReply reply;
try {
reply = server.get().snapshotManagement(request);
if (!reply.isSuccess()) {
throw new RatisRequestFailedException(reply.getException());
}
logger.info(
"{} group {}: successfully taken snapshot at index {} with force = {}",
this,
raftGroupId,
reply.getLogIndex(),
force);
} catch (IOException ioException) {
throw new RatisRequestFailedException(ioException);
}
} catch (IOException ioException) {
throw new RatisRequestFailedException(ioException);
}
}

Expand Down