[ 
https://issues.apache.org/jira/browse/IGNITE-21213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17809297#comment-17809297
 ] 

Denis Chudov edited comment on IGNITE-21213 at 1/22/24 8:32 AM:
----------------------------------------------------------------

There are 3 aspects of this problem:
 # Handling the events processing should be done within the replica stripe, 
will be covered in IGNITE-21258
 # We shouldn't allow to process transactional requests and events handling 
simultaneously wrt async calls, so we should make something like read-write 
lock (but not literally, because simple read-write lock will lead to 
deadlocks). Can be done in this ticket.
 # We shouldn't allow to process new transactional requests until the event 
handling is done, PlacementDriver#previousPrimaryExpired future can be used for 
this: IGNITE-21325


was (Author: denis chudov):
There are 3 aspects of this problem:
 # Handling the events processing should be done within the replica stripe, 
will be covered in IGNITE-21258
 # We shouldn't allow to process transactional requests and events handling 
simultaneously wrt async calls, so we should make something like read-write 
lock (but not literally, because simple read-write lock will lead to 
deadlocks). Can be done in this ticket.
 # We shouldn't allow to process new transactional requests until the event 
handling is done, PlacementDriver#previousPrimaryExpired future can be used for 
this.

> 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
>            Priority: Major
>              Labels: ignite-3
>
> 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. For example, 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.
> h3. Definition of done
> The two mechanisms work in coordination.



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

Reply via email to