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/04/17 21:05:41 UTC
[ratis] branch master updated: RATIS-1835. Keep nextIndex unchanged when leader sending heartbeat to restarting followers (#875)
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 60587b63a RATIS-1835. Keep nextIndex unchanged when leader sending heartbeat to restarting followers (#875)
60587b63a is described below
commit 60587b63a4401cc6160907d33fb5cd89dbbdc724
Author: William Song <48...@users.noreply.github.com>
AuthorDate: Tue Apr 18 05:05:35 2023 +0800
RATIS-1835. Keep nextIndex unchanged when leader sending heartbeat to restarting followers (#875)
---
.../src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java | 3 +++
1 file changed, 3 insertions(+)
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 0b9ef2bd3..0b8b9f354 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
@@ -128,6 +128,9 @@ public class GrpcLogAppender extends LogAppenderBase {
" keep nextIndex ({}) unchanged and retry.", this, f.getNextIndex());
return;
}
+ if (request != null && request.isHeartbeat()) {
+ return;
+ }
getFollower().decreaseNextIndex(nextIndex);
} catch (IOException ie) {
LOG.warn(this + ": Failed to getClient for " + getFollowerId(), ie);