[
https://issues.apache.org/jira/browse/IGNITE-4145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15654089#comment-15654089
]
Andrew Mashenkov commented on IGNITE-4145:
------------------------------------------
Test added.
Sergi, thanks for pointing me!
I've found another race. Page should be added after remainingRow counter
updated but before the counter initialized flag raised to avoid race condition
on adding LastPage.
Sergi, please review PR once more.
> "No query result found for request" exception when running multiple queries
> concurrently.
> -----------------------------------------------------------------------------------------
>
> Key: IGNITE-4145
> URL: https://issues.apache.org/jira/browse/IGNITE-4145
> Project: Ignite
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.7
> Reporter: Vladimir Ozerov
> Assignee: Andrew Mashenkov
> Fix For: 1.8
>
>
> When many queries are executed simultaneously in multi-node cluster, the
> following exception might appear from time to time:
> {code}
> Exception in thread "qry-exec-20" javax.cache.CacheException: Failed to fetch
> data from node: 3432842f-2fa2-44b9-b69b-cadba286d317
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$3.fetchNextPage(GridReduceQueryExecutor.java:298)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridMergeIndex.fetchNextPage(GridMergeIndex.java:229)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridMergeIndexUnsorted$1.hasNext(GridMergeIndexUnsorted.java:106)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridMergeIndex$IteratorCursor.next(GridMergeIndex.java:351)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridMergeIndex$FetchingCursor.next(GridMergeIndex.java:382)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:640)
> at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$4.iterator(IgniteH2Indexing.java:1057)
> at
> org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:81)
> at
> org.apache.ignite.yardstick.ringcentral.AdgRunner$QueryExecutor.run(AdgRunner.java:394)
> at java.lang.Thread.run(Thread.java:745)
> Suppressed: javax.cache.CacheException: Failed to execute map query on
> the node: c51bc4f2-7038-4df6-88a9-eb87506c2f86, class
> javax.cache.CacheException:No query result found for request:
> GridQueryNextPageRequest [qryReqId=93, qry=0, pageSize=1024]
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.fail(GridReduceQueryExecutor.java:259)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.onFail(GridReduceQueryExecutor.java:249)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.onMessage(GridReduceQueryExecutor.java:230)
> at
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.onMessage(GridReduceQueryExecutor.java:178)
> at
> org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:1900)
> at
> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1080)
> at
> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:708)
> at
> org.apache.ignite.internal.managers.communication.GridIoManager.access$1700(GridIoManager.java:101)
> at
> org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:671)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> ... 1 more
> {code}
> Quick analysis shows that next-page request could possibly arrive before
> original query message is processed. Need to confirm it with deeper debugging
> first.
> The best way to reproduce it:
> 1) Generate some data
> 2) Start several data nodes (e.g. 4)
> 3) Start client node
> 4) Concurrently execute multiple SQL queries from the client in different
> threads.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)