Skip to content

Commit a1e6501

Browse files
committed
IGNITE-26451 Fixed PerformanceStatisticsQueryTest to handle fetchAll scenario and improved GridCacheDistributedQueryFuture by passing cancel flag to onDone method
1 parent d674273 commit a1e6501

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryFuture.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.apache.ignite.internal.processors.query.QueryUtils;
4141
import org.apache.ignite.internal.util.lang.GridPlainCallable;
4242
import org.apache.ignite.internal.util.typedef.internal.U;
43+
import org.jetbrains.annotations.Nullable;
4344

4445
import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.INDEX;
4546
import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.TEXT;
@@ -144,8 +145,6 @@ private ClusterNode node(Collection<ClusterNode> nodes) {
144145
cctx.queries().onQueryFutureCanceled(reqId);
145146

146147
clear();
147-
148-
onDone(err);
149148
}
150149

151150
/** {@inheritDoc} */
@@ -326,8 +325,11 @@ private void cancelPages(UUID nodeId) {
326325
}
327326

328327
/** {@inheritDoc} */
329-
@Override public boolean onDone(Collection<R> res, Throwable err) {
330-
boolean done = super.onDone(res, err);
328+
@Override protected boolean onDone(@Nullable Collection<R> res, @Nullable Throwable err, boolean cancel) {
329+
boolean done = super.onDone(res, err, cancel);
330+
331+
if (!done)
332+
return false;
331333

332334
if (cctx.kernalContext().performanceStatistics().enabled() && startTimeNanos > 0) {
333335
GridCacheQueryType type = qry.query().type();
@@ -348,6 +350,6 @@ private void cancelPages(UUID nodeId) {
348350
err == null || QueryUtils.wasCancelled(err));
349351
}
350352

351-
return done;
353+
return true;
352354
}
353355
}

modules/indexing/src/test/java/org/apache/ignite/internal/processors/performancestatistics/PerformanceStatisticsQueryTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,6 @@ public static Collection<?> parameters() {
169169
}
170170
}
171171

172-
/** {@inheritDoc} */
173-
@Override protected void beforeTest() throws Exception {
174-
if (!fetchAll)
175-
assumeTrue(pageSize < ENTRY_COUNT);
176-
}
177-
178172
/** {@inheritDoc} */
179173
@Override protected void afterTestsStopped() throws Exception {
180174
super.afterTestsStopped();

0 commit comments

Comments
 (0)