sanpwc commented on code in PR #3540:
URL: https://github.com/apache/ignite-3/pull/3540#discussion_r1553866201
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -394,6 +396,52 @@ public PartitionReplicaListener(
prepareIndexBuilderTxRwOperationTracker();
}
+ @Override
+ public CompletableFuture<Boolean>
onPrimaryElected(PrimaryReplicaEventParameters evt) {
+ assert replicationGroupId.equals(evt.groupId()) : format(
+ "The replication group listener does not match the event
[grp={}, eventGrp={}]",
+ replicationGroupId,
+ evt.groupId()
+ );
+
+ if (!localNode.id().equals(evt.leaseholderId())) {
Review Comment:
Is it really possible? Primary replica elected is a local event.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]