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/09/27 21:15:00 UTC
[jira] [Updated] (RATIS-336) LeaderState.isBootStrappingPeer may
have NPE
[ https://issues.apache.org/jira/browse/RATIS-336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz Wo Nicholas Sze updated RATIS-336:
--------------------------------------
Component/s: server
> 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
>
> {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)