[
https://issues.apache.org/jira/browse/IGNITE-19971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mirza Aliev updated IGNITE-19971:
---------------------------------
Reviewer: Vladislav Pyatkov
> Flaky ItNodeTest#testLeaseReadAfterSegmentation
> -----------------------------------------------
>
> Key: IGNITE-19971
> URL: https://issues.apache.org/jira/browse/IGNITE-19971
> Project: Ignite
> Issue Type: Bug
> Reporter: Mirza Aliev
> Assignee: Mirza Aliev
> Priority: Major
> Labels: ignite-3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> ItNodeTest#testLeaseReadAfterSegmentation is flaky
> {code:java}
> java.lang.NullPointerException: Cannot invoke
> "org.apache.ignite.raft.jraft.Node.getNodeId()" because the return value of
> "org.apache.ignite.raft.jraft.core.TestCluster.getLeader()" is null
> at
> org.apache.ignite.raft.jraft.core.ItNodeTest.lambda$testLeaseReadAfterSegmentation$43(ItNodeTest.java:3652)
> {code}
> The problem was in the race in
> {code:java}
> assertTrue(waitForCondition(() -> cluster.getLeader() != null &&
> !leader.getNodeId().equals(cluster.getLeader().getNodeId()),
> 10_000));
> {code}
> so leader was stepped done in the middle of this assertion, so the first part
> of this expression {{cluster.getLeader() != null}} was true.
> The fix is to rewrite condition to defence against NPE.
> After 300 local runs there is no failures, but 3 failures in 100 runs were
> before fix
--
This message was sent by Atlassian Jira
(v8.20.10#820010)