You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by sz...@apache.org on 2023/05/13 08:37:49 UTC

[ratis] branch master updated: RATIS-1841. Fixed bug where cluster restart failed to transfer snapshot. (#879)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new f82f302a4 RATIS-1841. Fixed bug where cluster restart failed to transfer snapshot. (#879)
f82f302a4 is described below

commit f82f302a43d693856766419a379556179ebcaa5f
Author: Potato <ta...@apache.org>
AuthorDate: Sat May 13 16:37:43 2023 +0800

    RATIS-1841. Fixed bug where cluster restart failed to transfer snapshot. (#879)
---
 .../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 0b8b9f354..69b030bf0 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
@@ -123,9 +123,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()) {