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


##########
modules/replicator/src/main/java/org/apache/ignite/internal/raft/client/TopologyAwareRaftGroupService.java:
##########
@@ -337,10 +337,14 @@ public CompletableFuture<Void> 
subscribeLeader(LeaderElectionListener callback)
 
                 refreshAndGetLeaderWithTerm().thenAcceptAsync(leaderWithTerm 
-> {
                     if (!leaderWithTerm.isEmpty()) {
-                        serverEventHandler.onLeaderElected(
-                                
clusterService.topologyService().getByConsistentId(leaderWithTerm.leader().consistentId()),
-                                leaderWithTerm.term()
-                        );
+                        ClusterNode leaderHost = 
clusterService.topologyService().getByConsistentId(leaderWithTerm.leader().consistentId());
+
+                        if (leaderHost != null) {

Review Comment:
   I would print a warning here and below as the same.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to