[ https://issues.apache.org/jira/browse/RATIS-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16638279#comment-16638279 ]
Mukul Kumar Singh commented on RATIS-336: ----------------------------------------- Thanks for the updated patch [~szetszwo]. The latest patch look good to me. I will commit this shortly > LeaderState.isBootStrappingPeer may have NPE > -------------------------------------------- > > Key: RATIS-336 > URL: https://issues.apache.org/jira/browse/RATIS-336 > Project: Ratis > Issue Type: Bug > Components: server > Reporter: Tsz Wo Nicholas Sze > Assignee: Tsz Wo Nicholas Sze > Priority: Major > Attachments: r336_20181001.patch > > > {code} > //LeaderState > boolean isBootStrappingPeer(RaftPeerId peerId) { > return inStagingState() && getStagingState().contains(peerId); > } > boolean inStagingState() { > return stagingState != null; > } > > ConfigurationStagingState getStagingState() { > return stagingState; > } > {code} > Since stagingState is volatile, it could be set to null between > inStagingState() and contains(..). -- This message was sent by Atlassian JIRA (v7.6.3#76005)