Skip to content

Commit 6b5fc35

Browse files
authored
Increase step between checks for cancellation (#53712)
The introduction of the ExitableDirectoryReader showed increase of latencies for range queries using pointvalues. Check for cancellation every 1024 docs instead of every 15 to lower the impact of the check in query's performance. Follows: #52822 Fixes: #53496
1 parent f2a2dcb commit 6b5fc35

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) - 1; // 1023
249249

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

0 commit comments

Comments
 (0)