IGNITE-27873 Fix flaky IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest related tests#12749
IGNITE-27873 Fix flaky IgniteCacheQueryStopOnCancelOrTimeoutDistributedJoinSelfTest related tests#12749zstan wants to merge 1 commit intoapache:masterfrom
Conversation
5f9ba6b to
aa4d6ed
Compare
…edJoinSelfTest related tests
|
| private void testQueryCancel(Ignite ignite, String cacheName, String sql, int timeoutUnits, TimeUnit timeUnit, | ||
| boolean timeout, boolean checkCanceled) throws Exception { | ||
| SqlFieldsQuery qry = new SqlFieldsQuery(sql).setDistributedJoins(true); | ||
| SqlFieldsQuery qry = new SqlFieldsQuery(sql).setDistributedJoins(true);; |
| int resSize = 0; | ||
| for (List<?> ignored1 : cursor) { | ||
| ++resSize; | ||
| } |
There was a problem hiding this comment.
int resSize = F.size(cursor.iterator());?
| ConcurrentMap<UUID, ?> map = U.field(((IgniteH2Indexing)U.field((GridProcessor)U.field( | ||
| grid.context(), "qryProc"), "idx")).mapQueryExecutor(), "qryRess"); |
There was a problem hiding this comment.
Let's fix this mess too:
ConcurrentMap<UUID, ?> map = U.field(
((IgniteH2Indexing)grid(0).context().query().getIndexing()).mapQueryExecutor(), "qryRess");
| try (QueryCursor<List<?>> ignored = cursor) { | ||
| cursor.getAll(); | ||
| int resSize = 0; | ||
| for (List<?> ignored1 : cursor) { |
There was a problem hiding this comment.
testCancel3 fails sometimes here locally:
org.apache.ignite.IgniteException: The query was cancelled while executing.
at org.apache.ignite.internal.util.lang.GridIteratorAdapter.next(GridIteratorAdapter.java:38)
at org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator.next(GridQueryCacheObjectsIterator.java:67)
at org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator.next(GridQueryCacheObjectsIterator.java:31)
at org.apache.ignite.internal.processors.cache.QueryCursorImpl$LazyIterator.next(QueryCursorImpl.java:287)
at org.apache.ignite.internal.processors.query.h2.RegisteredQueryCursor$RegisteredIterator.next(RegisteredQueryCursor.java:181)
It happens when query cancelled during fetch (after iterator() call and before all result processed). Exception was wrapped to IgniteException, but CacheException expected.
|
|
||
| /** */ | ||
| private static final int PURCHASE_CNT = 6_000; | ||
| private static final int PURCHASE_CNT = 24_000; |
There was a problem hiding this comment.
It still looks fragile. On fast environment we will again face this problem. Maybe use functions to guarantee long time execution (sleep, latch)?




No description provided.