[
https://issues.apache.org/jira/browse/RATIS-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18070502#comment-18070502
]
Ivan Andika edited comment on RATIS-2487 at 4/2/26 7:50 AM:
------------------------------------------------------------
Attached the relevant log [^ratis-2487-npe.txt] for the tests encountering the
NPE. This test keep doing consecutive Ratis server restarts under heavy writes
which might have triggered an edge case causing the NPE.
was (Author: JIRAUSER298977):
Attached the relevant log [^ratis-2487-npe.txt] for the tests encountering the
NPE. This test keep doing consecutive Ratis server restarts which might have
triggered an edge case causing the NPE.
> NPE when there is no previous log
> ---------------------------------
>
> Key: RATIS-2487
> URL: https://issues.apache.org/jira/browse/RATIS-2487
> Project: Ratis
> Issue Type: Bug
> Reporter: Ivan Andika
> Assignee: Ivan Andika
> Priority: Major
> Attachments: ratis-2487-npe.txt
>
>
> Found the following logs in tests
> {code:java}
> java.lang.NullPointerException: omNode-2@group-523986131536->omNode-1:
> Previous TermIndex not found for firstIndex = 93 at
> java.base/java.util.Objects.requireNonNull(Objects.java:360) at
> org.apache.ratis.server.leader.LogAppenderBase.assertProtos(LogAppenderBase.java:270)
> at
> org.apache.ratis.server.leader.LogAppenderBase.newAppendEntriesRequest(LogAppenderBase.java:255)
> at
> org.apache.ratis.grpc.server.GrpcLogAppender.appendLog(GrpcLogAppender.java:387)
> at
> org.apache.ratis.grpc.server.GrpcLogAppender.run(GrpcLogAppender.java:262)
> at
> org.apache.ratis.server.leader.LogAppenderDaemon.run(LogAppenderDaemon.java:80)
> at java.base/java.lang.Thread.run(Thread.java:1583) {code}
> Seems to be related to this Ratis NPE when there is no previous log (when the
> logs are purged). After RATIS-2427, NPE will not cause LogAppender to be
> restarted. This can cause the leader to not send anything anymore and can
> cause the Raft group to be stuck.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)