Vladislav Pyatkov created IGNITE-21213:
------------------------------------------

             Summary: Coordination of mechanisms of determination for primary 
on replicaside
                 Key: IGNITE-21213
                 URL: https://issues.apache.org/jira/browse/IGNITE-21213
             Project: Ignite
          Issue Type: Bug
            Reporter: Vladislav Pyatkov


h3. Motivation
In the replica listener, we have unconsidered mechanisms between each other to 
determine primary rteplica. The first one is based on the placement driver API 
(it is used in PartitionReplicaListener#ensureReplicaIsPrimary) and the other 
one is based on the placement driver events (the events are hadeled by two 
methods: ReplicaManager#onPrimaryReplicaElected, 
ReplicaManager#onPrimaryReplicaExpired).

Because the replica messages and events are handled in different threads, any 
variety of processing is possible. The replica can release all transaction 
locks (by

PRIMARY_REPLICA_EXPIRED event) and then handle a message for this transaction 
(because ensureReplicaIsPrimary was done before), assuming that all the locks 
are holding.



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

Reply via email to