Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When a raft node fails to start, NPE will appear, and the error stack is as follows:
GrpcLogAppender - Failed onNext request=AppendEntriesRequest:cid=302,entriesCount=0,lastEntry=null, reply=VM-212-21-centos_19201<-VM-212-21-centos_19200#302:OK-t230,SUCCESS,nextIndex=76347,followerCommit=76346,matchIndex=-1 java.lang.NullPointerException at org.apache.ratis.server.impl.ReadIndexHeartbeats$AppendEntriesListener.lambda$receive$1(ReadIndexHeartbeats.java:104) at org.apache.ratis.server.impl.LeaderStateImpl.hasMajority(LeaderStateImpl.java:841) at org.apache.ratis.server.impl.LeaderStateImpl.hasMajority(LeaderStateImpl.java:822) at org.apache.ratis.server.impl.ReadIndexHeartbeats$AppendEntriesListener.receive(ReadIndexHeartbeats.java:104) at org.apache.ratis.server.impl.ReadIndexHeartbeats$AppendEntriesListeners.onAppendEntriesReply(ReadIndexHeartbeats.java:141) at org.apache.ratis.server.impl.ReadIndexHeartbeats.onAppendEntriesReply(ReadIndexHeartbeats.java:167) at org.apache.ratis.server.impl.LeaderStateImpl.onAppendEntriesReply(LeaderStateImpl.java:1122) at org.apache.ratis.grpc.server.GrpcLogAppender$AppendLogResponseHandler.onNextImpl(GrpcLogAppender.java:395) at org.apache.ratis.grpc.server.GrpcLogAppender$AppendLogResponseHandler.onNext(GrpcLogAppender.java:359) at org.apache.ratis.grpc.server.GrpcLogAppender$AppendLogResponseHandler.onNext(GrpcLogAppender.java:334) at org.apache.ratis.thirdparty.io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:474) at org.apache.ratis.thirdparty.io.grpc.internal.DelayedClientCall$DelayedListener.onMessage(DelayedClientCall.java:452) at org.apache.ratis.thirdparty.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInternal(ClientCallImpl.java:661) at org.apache.ratis.thirdparty.io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:646) at org.apache.ratis.thirdparty.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at org.apache.ratis.thirdparty.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)