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

tanxinyu pushed a commit to branch snapshot-3
in repository https://gitbox.apache.org/repos/asf/ratis.git

commit cbdfe631426cd27c57b893833a35b4a818508f76
Author: Potato <[email protected]>
AuthorDate: Tue Aug 13 12:17:47 2024 +0800

    RATIS-2138 Remove uncessary error log in JVMPauseMonitor When GC is serious 
(#1133)
---
 .../src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java 
b/ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java
index eacf50615..b7c51adcc 100644
--- 
a/ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java
+++ 
b/ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java
@@ -618,7 +618,7 @@ class LeaderStateImpl implements LeaderState {
       List<LogEntryProto> entries, TermIndex previous, long callId) {
     final boolean initializing = !isCaughtUp(follower);
     final RaftPeerId targetId = follower.getId();
-    return ServerProtoUtils.toAppendEntriesRequestProto(server.getMemberId(), 
targetId, currentTerm, entries,
+    return ServerProtoUtils.toAppendEntriesRequestProto(server.getMemberId(), 
targetId, getCurrentTerm(), entries,
         ServerImplUtils.effectiveCommitIndex(raftLog.getLastCommittedIndex(), 
previous, entries.size()),
         initializing, previous, server.getCommitInfos(), callId);
   }
@@ -698,7 +698,7 @@ class LeaderStateImpl implements LeaderState {
   }
 
   void submitStepDownEvent(StepDownReason reason) {
-    submitStepDownEvent(getCurrentTerm(), reason);
+    submitStepDownEvent(currentTerm, reason);
   }
 
   void submitStepDownEvent(long term, StepDownReason reason) {

Reply via email to