Song Ziyang created RATIS-1751:
----------------------------------

             Summary: 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


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)

Reply via email to