From 2a0d56950c909cdf9a1955eb5812cb1718ebe4fd Mon Sep 17 00:00:00 2001 From: szywilliam Date: Wed, 12 Jun 2024 14:02:25 +0800 Subject: [PATCH] RATIS-2084. Follower reply ALREADY_INSTALLED when install old snapshots from leader (#1091) --- .../apache/ratis/server/impl/SnapshotInstallationHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ratis-server/src/main/java/org/apache/ratis/server/impl/SnapshotInstallationHandler.java b/ratis-server/src/main/java/org/apache/ratis/server/impl/SnapshotInstallationHandler.java index 3662c19492..3b4fb5eff9 100644 --- a/ratis-server/src/main/java/org/apache/ratis/server/impl/SnapshotInstallationHandler.java +++ b/ratis-server/src/main/java/org/apache/ratis/server/impl/SnapshotInstallationHandler.java @@ -176,7 +176,7 @@ private InstallSnapshotReplyProto checkAndInstallSnapshot(InstallSnapshotRequest // considering a follower peer requiring a snapshot installation does not // have a lot of requests if (state.getLog().getLastCommittedIndex() >= lastIncludedIndex) { - return toInstallSnapshotReplyProto(leaderId, getMemberId(), + return ServerProtoUtils.toInstallSnapshotReplyProto(leaderId, getMemberId(), currentTerm, snapshotChunkRequest.getRequestIndex(), InstallSnapshotResult.ALREADY_INSTALLED); }