[ 
https://issues.apache.org/jira/browse/IGNITE-28623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077682#comment-18077682
 ] 

Ignite TC Bot commented on IGNITE-28623:
----------------------------------------

{panel:title=Branch: [pull/13089/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/13089/head] Base: [master] : No new tests 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}{panel}
[TeamCity *--> Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=9040002&buildTypeId=IgniteTests24Java8_RunAll]

> Calcite engine. Query iterator can be prematurely closed, before returning 
> result to the user
> ---------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-28623
>                 URL: https://issues.apache.org/jira/browse/IGNITE-28623
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: MakeTeamcityGreenAgain, calcite, ise
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Calcite engine uses reference tracking to determine if there are no more 
> references to iterator and query can be closed (see 
> {{ClosableIteratorsHolder}}), but sometimes query can be closed prematurely 
> if there are already no references to iterator, but delegating iterator still 
> process data.
> For example, calls like {{cache.query(qry).iterator().next()}} (create 
> iterator, don't store it, use one delegate call) can fail in case of 
> concurrent GC.
> This issue also reproduced in test: 
> {{SqlPlanHistoryIntegrationTest.testDefaultHistorySize[sqlEngine=calcite, 
> isClient=false loc=false, isFullyFetched=false, isPerfStatsEnabled=false]}}
> With error:
> {noformat}
> class org.apache.ignite.internal.processors.query.IgniteSQLException: An 
> error occurred while query executing - The query was cancelled while 
> executing.
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.RootNode.checkException(RootNode.java:325)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.RootNode.exchangeBuffers(RootNode.java:314)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.RootNode.hasNext(RootNode.java:213)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.RootNode.next(RootNode.java:220)
>       at 
> org.apache.ignite.internal.processors.query.calcite.util.ConvertingClosableIterator.next(ConvertingClosableIterator.java:78)
>       at 
> org.apache.ignite.internal.processors.query.calcite.util.ConvertingClosableIterator.next(ConvertingClosableIterator.java:33)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.ClosableIteratorsHolder$DelegatingIterator.next(ClosableIteratorsHolder.java:149)
>       at 
> org.apache.ignite.internal.processors.query.calcite.integration.SqlPlanHistoryIntegrationTest.cacheQuery(SqlPlanHistoryIntegrationTest.java:650)
>       at 
> org.apache.ignite.internal.processors.query.calcite.integration.SqlPlanHistoryIntegrationTest.checkDefaultHistorySize(SqlPlanHistoryIntegrationTest.java:857)
>       at 
> org.apache.ignite.internal.processors.query.calcite.integration.SqlPlanHistoryIntegrationTest.testDefaultHistorySize(SqlPlanHistoryIntegrationTest.java:504)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2486)
>       at java.base/java.lang.Thread.run(Thread.java:829)
> Caused by: class 
> org.apache.ignite.internal.processors.query.IgniteSQLException: The query was 
> cancelled while executing.
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.rel.RootNode.close(RootNode.java:119)
>       at 
> org.apache.ignite.internal.processors.query.calcite.util.Commons.close(Commons.java:337)
>       at 
> org.apache.ignite.internal.processors.query.calcite.util.ConvertingClosableIterator.close(ConvertingClosableIterator.java:95)
>       at 
> org.apache.ignite.internal.util.CommonUtils.close(CommonUtils.java:1000)
>       at 
> org.apache.ignite.internal.processors.query.calcite.util.Commons.close(Commons.java:345)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.ClosableIteratorsHolder.cleanUp(ClosableIteratorsHolder.java:86)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.ClosableIteratorsHolder.lambda$init$0(ClosableIteratorsHolder.java:71)
>       ... 1 more
> Caused by: class org.apache.ignite.cache.query.QueryCancelledException: The 
> query was cancelled while executing.
>       ... 8 more
> {noformat}
>  And fails on TC: https://ci2.ignite.apache.org/viewLog.html?buildId=9034083



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

Reply via email to