vldpyatkov commented on code in PR #3007:
URL: https://github.com/apache/ignite-3/pull/3007#discussion_r1440638456


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -339,13 +338,13 @@ public PartitionReplicaListener(
         cursors = new 
ConcurrentSkipListMap<>(IgniteUuid.globalOrderComparator());
 
         schemaCompatValidator = new 
SchemaCompatibilityValidator(validationSchemasSource, catalogService, 
schemaSyncService);
-
-        placementDriver.listen(PrimaryReplicaEvent.PRIMARY_REPLICA_ELECTED, 
this::onPrimaryElected);
-        placementDriver.listen(PrimaryReplicaEvent.PRIMARY_REPLICA_EXPIRED, 
this::onPrimaryExpired);
     }
 
-    private CompletableFuture<Boolean> 
onPrimaryElected(PrimaryReplicaEventParameters evt, @Nullable Throwable 
exception) {
-        if (!localNode.name().equals(evt.leaseholder()) || 
!replicationGroupId.equals(evt.groupId())) {
+    @Override
+    public CompletableFuture<Boolean> 
onPrimaryElected(PrimaryReplicaEventParameters evt, @Nullable Throwable 
exception) {
+        assert replicationGroupId.equals(evt.groupId());

Review Comment:
   Please add a message to this assertion.
   "The replication group listener does not match to the event [ger={}, 
eventGrp={}]"



-- 
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]

Reply via email to