Denis Chudov created IGNITE-26075:
-------------------------------------

             Summary: refreshAndGetLeaderWithTerm may return stale leader which 
affects rebalancing
                 Key: IGNITE-26075
                 URL: https://issues.apache.org/jira/browse/IGNITE-26075
             Project: Ignite
          Issue Type: Bug
            Reporter: Denis Chudov


# Pending assignments are null
 # Leader is changed from node A to node B
 # onLeaderChange listener is triggered on node B, does nothing
 # Pending assignments are changed
 # Listener of pending assignments on node A does nothing because it is not a 
leader, and node B does refreshAndGetLeaderWithTerm, gets previous leader and 
term and also does nothing.

In this scenario, if B got the latest leader confirmed by majority of nodes it 
would process the new pending assignments correctly.

Also, in the case of majority confirmation this will work in a case when 
request of response of refreshAndGetLeaderWithTerm will stuck somewhere in 
network, because there would be happens before (PA is pending assignments):

PA change -> PA listener -> leader change -> onLeaderChange -> sees new PA



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to