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

Denis Chudov commented on IGNITE-20942:
---------------------------------------

[~alapin] LGTM.

> Primary replica events are handled by all replication groups
> ------------------------------------------------------------
>
>                 Key: IGNITE-20942
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20942
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vladislav Pyatkov
>            Assignee: Alexander Lapin
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> h3. Motivation
> PRIMARY_REPLICA_EXPIRED (PRIMARY_REPLICA_ELECTED) event is triggered by the 
> placement driver. The message contains a property that points to the 
> certificate replication group. But the event listener, which is determined in 
> each PartitionReplicaListener, does not handle the property:
> {code}
> if (!localNode.name().equals(evt.leaseholder())) {
>     return completedFuture(false);
>  }
> {code}
> The issue is also shown in the log: 
> {noformat}
> [2023-11-22T10:00:17,056][INFO 
> ][%isnt_tmpar_0%metastorage-watch-executor-3][PartitionReplicaListener] 
> Primary replica expired [grp=5_part_19]
> [2023-11-22T10:00:17,057][INFO 
> ][%isnt_tmpar_0%metastorage-watch-executor-3][PartitionReplicaListener] 
> Primary replica expired [grp=5_part_0]
> [2023-11-22T10:00:17,057][INFO 
> ][%isnt_tmpar_0%metastorage-watch-executor-3][PartitionReplicaListener] 
> Primary replica expired [grp=5_part_9]
> [2023-11-22T10:00:17,057][INFO 
> ][%isnt_tmpar_0%metastorage-watch-executor-3][PartitionReplicaListener] 
> Primary replica expired [grp=5_part_10]
> {noformat}
> h3. Implementation notes:
> Checking a replication group ID is enough to fix this issue (in both event 
> handlers).
> {code}
> if (!localNode.name().equals(evt.leaseholder()) || 
> !replicationGroupId.equals(evt.groupId())) {
>     return completedFuture(false);
> }
> {code}



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

Reply via email to