[ 
https://issues.apache.org/jira/browse/IGNITE-23649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexander Lapin updated IGNITE-23649:
-------------------------------------
    Description: 
Within 
{code:java}
refreshAndGetLeaderWithTerm().thenAcceptAsync(leaderWithTerm -> {
    if (!leaderWithTerm.isEmpty()) {
        serverEventHandler.onLeaderElected(
                
clusterService.topologyService().getByConsistentId(leaderWithTerm.leader().consistentId()),
                leaderWithTerm.term()
        );
    }
}, executor); {code}
{code:java}
clusterService.topologyService().getByConsistentId(leaderWithTerm.leader().consistentId()){code}
 may be null because of the race between leader refinement and logical topology 
update.

> refreshAndGetLeaderWithTerm() may throw NPE
> -------------------------------------------
>
>                 Key: IGNITE-23649
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23649
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Alexander Lapin
>            Priority: Major
>              Labels: ignite-3
>
> Within 
> {code:java}
> refreshAndGetLeaderWithTerm().thenAcceptAsync(leaderWithTerm -> {
>     if (!leaderWithTerm.isEmpty()) {
>         serverEventHandler.onLeaderElected(
>                 
> clusterService.topologyService().getByConsistentId(leaderWithTerm.leader().consistentId()),
>                 leaderWithTerm.term()
>         );
>     }
> }, executor); {code}
> {code:java}
> clusterService.topologyService().getByConsistentId(leaderWithTerm.leader().consistentId()){code}
>  may be null because of the race between leader refinement and logical 
> topology update.



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

Reply via email to