[ 
https://issues.apache.org/jira/browse/RATIS-337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz Wo Nicholas Sze updated RATIS-337:
--------------------------------------
    Attachment: r337_20181007.patch

> 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_20181007.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)

Reply via email to