You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz Wo Nicholas Sze (JIRA)" <ji...@apache.org> on 2018/10/02 01:00:24 UTC

[jira] [Updated] (RATIS-337) In RaftServerImpl, leaderState is accessed without proper null check

     [ 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_20181001.patch

> In RaftServerImpl, leaderState is 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_20181001.patch
>
>
> leaderState is declared as volatile.   Some code like below won't work since leaderState may be set to null in between.
> {code}
> //RaftServerImpl.checkLeaderState(..)
>     } else if (leaderState == null || !leaderState.isReady()) {
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)