[ https://issues.apache.org/jira/browse/IGNITE-24314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17953059#comment-17953059 ]
Kirill Tkalenko commented on IGNITE-24314: ------------------------------------------ In IGNITE-24273, the race between applying commands (tasks) to the state machine and deciding to create a snapshot was not fully fixed. If we look at *org.apache.ignite.raft.jraft.storage.snapshot.SnapshotExecutorImpl#doSnapshot(org.apache.ignite.raft.jraft.Closure, boolean)* (line 294), there is a comment that a false positive is possible due to the *this.fsmCaller.getLastAppliedIndex() == this.lastSnapshotIndex* condition due to updating *org.apache.ignite.raft.jraft.FSMCaller#getLastAppliedIndex* at the end of all commands (tasks). So to avoid this, it was necessary to add a wait for the *FSMCaller#getLastAppliedIndex* update for the count of commands (tasks) added. > ItNodeTest.testInstallSnapshotWithThrottle is flaky > --------------------------------------------------- > > Key: IGNITE-24314 > URL: https://issues.apache.org/jira/browse/IGNITE-24314 > Project: Ignite > Issue Type: Bug > Reporter: Alexander Lapin > Assignee: Kirill Tkalenko > Priority: Major > Labels: ignite-3 > Time Spent: 20m > Remaining Estimate: 0h > > ItNodeTest.testInstallSnapshotWithThrottle sometimes fails with > {code:java} > org.opentest4j.AssertionFailedError: expected: <2> but was: <1> at > app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) > at > app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) > at > app//org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197) > at > app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150) > at > app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145) > at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:531) > at > app//org.apache.ignite.raft.jraft.core.ItNodeTest.triggerLeaderSnapshot(ItNodeTest.java:4648) > at > app//org.apache.ignite.raft.jraft.core.ItNodeTest.testInstallSnapshotWithThrottle(ItNodeTest.java:2108) > {code} > [TC failure > link|https://ci.ignite.apache.org/buildConfiguration/ApacheIgnite3xGradle_Test_RunAllTests/8813973] > > Likely it's related to https://issues.apache.org/jira/browse/IGNITE-24273 -- This message was sent by Atlassian Jira (v8.20.10#820010)