[ https://issues.apache.org/jira/browse/RATIS-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16636072#comment-16636072 ]
Tsz Wo Nicholas Sze commented on RATIS-337: ------------------------------------------- r337_20181002.patch: some minor changes. > 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)