You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Song Ziyang (Jira)" <ji...@apache.org> on 2022/11/21 15:01:00 UTC
[jira] [Updated] (RATIS-1751) Race condition between LeaderStateImpl & ServerState
[ https://issues.apache.org/jira/browse/RATIS-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Song Ziyang updated RATIS-1751:
-------------------------------
Attachment: error_stack.log
> Race condition between LeaderStateImpl & ServerState
> ----------------------------------------------------
>
> Key: RATIS-1751
> URL: https://issues.apache.org/jira/browse/RATIS-1751
> Project: Ratis
> Issue Type: Bug
> Components: server
> Affects Versions: 2.4.0
> Reporter: Song Ziyang
> Priority: Minor
> Attachments: error_stack.log
>
>
> An IndexOutOfBoundsException is thrown from LeaderStateImpl during runtime. The error stack is attached.
> After checking the code, I think there are data race conditions between LeaderStateImpl.voterLists and ServerState.ConfigurationManager.currentConf.
> CurrentConf and voterLists should be updated synchronously, since there're strongly-related. However, in 2.4.0, currentConf in ServerState is updated in server-thread-pool, while voterLists in LeaderStateImpl is updated in LeaderState EventProcessor thread. There is possibility that IndexOutOfBoundsException occurs due to this data race.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)