Skip to content

Commit a1839d0

Browse files
committed
Increase step between checks for cancellation
Check for cancellation every 1024 docs instead of every 15 to lower the impact of the check in query's performance. Fixes: elastic#53496
1 parent 221b005 commit a1839d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/search/internal/ExitableDirectoryReader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public int getDocCount() {
245245

246246
private static class ExitableIntersectVisitor implements PointValues.IntersectVisitor {
247247

248-
private static final int MAX_CALLS_BEFORE_QUERY_TIMEOUT_CHECK = (1 << 4) - 1; // 15
248+
private static final int MAX_CALLS_BEFORE_QUERY_TIMEOUT_CHECK = 1 << 10; // 1024
249249

250250
private final PointValues.IntersectVisitor in;
251251
private final QueryCancellation queryCancellation;

0 commit comments

Comments
 (0)