[ https://issues.apache.org/jira/browse/RATIS-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16640493#comment-16640493 ]
Tsz Wo Nicholas Sze commented on RATIS-337: ------------------------------------------- I just have checked. The file r337_20181002.patch does apply to trunk. Are you sure you have pull RATIS-336? > In RaftServerImpl, leaderState/heartbeatMonitor may be accessed without > proper null check > ----------------------------------------------------------------------------------------- > > Key: RATIS-337 > URL: https://issues.apache.org/jira/browse/RATIS-337 > Project: Ratis > Issue Type: Bug > Components: server > Reporter: Tsz Wo Nicholas Sze > Assignee: Tsz Wo Nicholas Sze > Priority: Major > Attachments: r337_20181002.patch > > > leaderState/heartbeatMonitor is declared as volatile. Some code like below > won't work since leaderState may be set to null in between. > {code:java} > //RaftServerImpl.checkLeaderState(..) > } else if (leaderState == null || !leaderState.isReady()) { > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)