[
https://issues.apache.org/jira/browse/IGNITE-26247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vyacheslav Koptilin updated IGNITE-26247:
-----------------------------------------
Description:
New flaky test with low flaky rate.
{code:java}
14:22:36
org.apache.ignite.internal.sql.api.ItSqlClientSynchronousApiTest.cancelBatch()
14:22:41 java.lang.AssertionError:
Expected: is <0>
but: was <1>
14:22:41 java.lang.AssertionError:
Expected: is <0>
but: was <1>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
at
org.apache.ignite.internal.sql.BaseSqlIntegrationTest.lambda$waitUntilActiveTransactionsCount$7(BaseSqlIntegrationTest.java:295)
at
org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:53)
at
org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:248)
at
org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:235)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
{code}
[https://ci.ignite.apache.org/buildConfiguration/ApacheIgnite3xGradle_Test_RunAllTests/9409068?logFilter=debug&logView=flowAware]
UPDATE:
It seems to me that the root cause is that a SQL query asynchronously rolls
back the underlying transaction, and the query does not wait for its
completion. See
[ExecutionServiceImpl|https://github.com/apache/ignite-3/blob/main/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java#L367]
In that case, the test might observe the following: the SQL query is already
completed, but the number of active transactions does not equal 0, as mentioned
in the note above.
So, in case this behaviour is correct (I mean async rollback), then we need to
adjust the test in the same way
[IGNITE-25930|https://issues.apache.org/jira/browse/IGNITE-25930]
Otherwise, it should be changed to a sync rollback and remove changes
introduced by [IGNITE-25930|https://issues.apache.org/jira/browse/IGNITE-25930]
was:
New flaky test with low flaky rate.
{code:java}
14:22:36
org.apache.ignite.internal.sql.api.ItSqlClientSynchronousApiTest.cancelBatch()
14:22:41 java.lang.AssertionError:
Expected: is <0>
but: was <1>
14:22:41 java.lang.AssertionError:
Expected: is <0>
but: was <1>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
at
org.apache.ignite.internal.sql.BaseSqlIntegrationTest.lambda$waitUntilActiveTransactionsCount$7(BaseSqlIntegrationTest.java:295)
at
org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:53)
at
org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:248)
at
org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:235)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
{code}
[https://ci.ignite.apache.org/buildConfiguration/ApacheIgnite3xGradle_Test_RunAllTests/9409068?logFilter=debug&logView=flowAware]
UPDATE:
It seems to me that the root cause is that a SQL query asynchronously rolls
back the underlying transaction and the query does not wait for its completion.
See
[ExecutionServiceImpl|https://github.com/apache/ignite-3/blob/main/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java#L367]
> Flaky
> org.apache.ignite.internal.sql.api.ItSqlClientSynchronousApiTest.cancelBatch
> ----------------------------------------------------------------------------------
>
> Key: IGNITE-26247
> URL: https://issues.apache.org/jira/browse/IGNITE-26247
> Project: Ignite
> Issue Type: Improvement
> Components: sql ai3
> Reporter: Iurii Gerzhedovich
> Priority: Major
> Labels: MakeTeamcityGreenAgain, ignite-3
>
> New flaky test with low flaky rate.
> {code:java}
> 14:22:36
> org.apache.ignite.internal.sql.api.ItSqlClientSynchronousApiTest.cancelBatch()
> 14:22:41 java.lang.AssertionError:
> Expected: is <0>
> but: was <1>
> 14:22:41 java.lang.AssertionError:
> Expected: is <0>
> but: was <1>
> at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
> at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
> at
> org.apache.ignite.internal.sql.BaseSqlIntegrationTest.lambda$waitUntilActiveTransactionsCount$7(BaseSqlIntegrationTest.java:295)
> at
> org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:53)
> at
> org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:248)
> at
> org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:235)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
> at java.base/java.lang.Thread.run(Thread.java:833)
> {code}
> [https://ci.ignite.apache.org/buildConfiguration/ApacheIgnite3xGradle_Test_RunAllTests/9409068?logFilter=debug&logView=flowAware]
>
> UPDATE:
> It seems to me that the root cause is that a SQL query asynchronously rolls
> back the underlying transaction, and the query does not wait for its
> completion. See
> [ExecutionServiceImpl|https://github.com/apache/ignite-3/blob/main/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java#L367]
> In that case, the test might observe the following: the SQL query is already
> completed, but the number of active transactions does not equal 0, as
> mentioned in the note above.
> So, in case this behaviour is correct (I mean async rollback), then we need
> to adjust the test in the same way
> [IGNITE-25930|https://issues.apache.org/jira/browse/IGNITE-25930]
> Otherwise, it should be changed to a sync rollback and remove changes
> introduced by
> [IGNITE-25930|https://issues.apache.org/jira/browse/IGNITE-25930]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)