[
https://issues.apache.org/jira/browse/HDDS-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784403#comment-17784403
]
Sumit Agrawal commented on HDDS-9660:
-------------------------------------
836 @VisibleForTesting
837 public RaftPeerId getRaftLeaderId() {
838 return this.getLeader() == null ? null : this.getLeader().getId();
839 }
There is a very rare chance that first call "getLeader()" is not null, but
second call getLeader() is null as depends on state of raft at the particular
time.
So need get value to local variable and use that to return Id.
> java.lang.NullPointerException: at
> org.apache.hadoop.ozone.om.ratis.OzoneManagerRatisServer.getRaftLeaderId
> -----------------------------------------------------------------------------------------------------------
>
> Key: HDDS-9660
> URL: https://issues.apache.org/jira/browse/HDDS-9660
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Sumit Agrawal
> Assignee: Sumit Agrawal
> Priority: Major
> Labels: pull-request-available
>
> Server handler 84 on 9862]-org.apache.hadoop.ipc.Server: IPC Server handler
> 84 on 9862, call Call#3432296 Retry#0
> org.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol.submitRequest from
> 10.17.246.37:48990
> java.lang.NullPointerException
> at
> org.apache.hadoop.ozone.om.ratis.OzoneManagerRatisServer.getRaftLeaderId(OzoneManagerRatisServer.java:838)
> at
> org.apache.hadoop.ozone.om.OzoneManager.checkLeaderStatus(OzoneManager.java:3983)
> at
> org.apache.hadoop.ozone.om.ratis.utils.OzoneManagerRatisUtils.checkLeaderStatus(OzoneManagerRatisUtils.java:473)
> at
> org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB.processRequest(OzoneManagerProtocolServerSideTranslatorPB.java:185)
> at
> org.apache.hadoop.hdds.server.OzoneProtocolMessageDispatcher.processRequest(OzoneProtocolMessageDispatcher.java:87)
> at
> org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB.submitRequest(OzoneManagerProtocolServerSideTranslatorPB.java:148)
> at
> org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos$OzoneManagerService$2.callBlockingMethod(OzoneManagerProtocolProtos.java)
> at
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:533)
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1070)
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:994)
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:922)
> at java.base/java.security.AccessController.doPrivileged(Native Method)
> at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
> at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1899)
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2899)
> h4.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]