This is an automated email from the ASF dual-hosted git repository.

szetszwo pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/ratis.git

commit a25615ef805ecdb75ae7dd1752676a610f5adde1
Author: Potato <[email protected]>
AuthorDate: Sat May 13 16:37:43 2023 +0800

    RATIS-1841. Fixed bug where cluster restart failed to transfer snapshot. 
(#879)
    
    (cherry picked from commit f82f302a43d693856766419a379556179ebcaa5f)
---
 .../src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java 
b/ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java
index 210e70930..19e1216d0 100644
--- a/ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java
+++ b/ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java
@@ -131,9 +131,9 @@ public class GrpcLogAppender extends LogAppenderBase {
           .map(AppendEntriesRequest::getPreviousLog)
           .map(TermIndex::getIndex)
           .orElseGet(f::getMatchIndex);
-      if (onError && f.getMatchIndex() == 0 && request == null) {
-        LOG.warn("{}: Follower failed when matchIndex == 0, " +
-          " keep nextIndex ({}) unchanged and retry.", this, f.getNextIndex());
+      if (onError && request == null) {
+        LOG.warn("{}: Follower failed and request == null, " +
+            " keep nextIndex ({}) unchanged and retry.", this, 
f.getNextIndex());
         return;
       }
       if (request != null && request.isHeartbeat()) {

Reply via email to