133tosakarin commented on code in PR #1145:
URL: https://github.com/apache/ratis/pull/1145#discussion_r1746371780


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/SnapshotInstallationHandler.java:
##########
@@ -172,6 +174,12 @@ private InstallSnapshotReplyProto 
checkAndInstallSnapshot(InstallSnapshotRequest
       state.setLeader(leaderId, "installSnapshot");
 
       
server.updateLastRpcTime(FollowerState.UpdateType.INSTALL_SNAPSHOT_START);
+      if (snapshotChunkRequest.getRequestIndex() == 0) {
+        chunkRequestIndex.set(0);

Review Comment:
   After successfully receiving the first chunk, the chunkRequestIndex is 0,  
but the requestIndex of the second chunk will be 1.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to