Josh Elser created RATIS-673:
--------------------------------
Summary: NPE exporting a log in LogStateMachine
Key: RATIS-673
URL: https://issues.apache.org/jira/browse/RATIS-673
Project: Ratis
Issue Type: Bug
Reporter: Josh Elser
{noformat}
2019-09-04 16:32:21,638 WARN server.LogStateMachine
(LogStateMachine.java:processArchiveLog(686)) - Exception while processing
archival request for LogName['testLogExport']
java.lang.NullPointerException
at
org.apache.ratis.logservice.server.LogStateMachine.processArchiveLog(LogStateMachine.java:619)
at
org.apache.ratis.logservice.server.LogStateMachine.access$6(LogStateMachine.java:599)
at
org.apache.ratis.logservice.server.LogStateMachine$7.run(LogStateMachine.java:310)
at
org.apache.ratis.statemachine.impl.BaseStateMachine.recordTime(BaseStateMachine.java:210)
at
org.apache.ratis.logservice.server.LogStateMachine.query(LogStateMachine.java:308)
at
org.apache.ratis.server.impl.RaftServerImpl.submitClientRequestAsync(RaftServerImpl.java:553)
at
org.apache.ratis.server.impl.RaftServerProxy.lambda$submitClientRequestAsync$7(RaftServerProxy.java:333)
at
org.apache.ratis.server.impl.RaftServerProxy.lambda$null$5(RaftServerProxy.java:328)
at org.apache.ratis.util.JavaUtils.callAsUnchecked(JavaUtils.java:109)
at
org.apache.ratis.server.impl.RaftServerProxy.lambda$submitRequest$6(RaftServerProxy.java:328)
at
java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:981)
at
java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2124)
at
org.apache.ratis.server.impl.RaftServerProxy.submitRequest(RaftServerProxy.java:327)
at
org.apache.ratis.server.impl.RaftServerProxy.submitClientRequestAsync(RaftServerProxy.java:333)
at
org.apache.ratis.grpc.client.GrpcClientProtocolService$RequestStreamObserver.processClientRequest(GrpcClientProtocolService.java:220)
at
org.apache.ratis.grpc.client.GrpcClientProtocolService$UnorderedRequestStreamObserver.processClientRequest(GrpcClientProtocolService.java:276)
at
org.apache.ratis.grpc.client.GrpcClientProtocolService$RequestStreamObserver.onNext(GrpcClientProtocolService.java:240)
at
org.apache.ratis.grpc.client.GrpcClientProtocolService$RequestStreamObserver.onNext(GrpcClientProtocolService.java:168)
at
org.apache.ratis.thirdparty.io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:248)
at
org.apache.ratis.thirdparty.io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:263)
at
org.apache.ratis.thirdparty.io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:686)
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:123)
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:748) {noformat}
Saw this in {{TestMetaServer-output.txt}}.
Problem seems to beĀ
[https://github.com/apache/incubator-ratis/blob/c2a6a24a9ff85cc24132f5d5db40391bd36fbe70/ratis-logservice/src/main/java/org/apache/ratis/logservice/server/LogStateMachine.java#L612-L613]
The {{putIfAbsent}} call would return {{null}}. Interestingly, the test cases
still pass somehow :)
FYI [~ankit.singhal]
--
This message was sent by Atlassian Jira
(v8.3.2#803003)