Skip to content

Commit

Permalink
Increase step between checks for cancellation (elastic#53712)
Browse files Browse the repository at this point in the history
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: elastic#52822
Fixes: elastic#53496
  • Loading branch information
matriv authored Mar 18, 2020
1 parent f2a2dcb commit 6b5fc35
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public int getDocCount() {

private static class ExitableIntersectVisitor implements PointValues.IntersectVisitor {

private static final int MAX_CALLS_BEFORE_QUERY_TIMEOUT_CHECK = (1 << 4) - 1; // 15
private static final int MAX_CALLS_BEFORE_QUERY_TIMEOUT_CHECK = (1 << 10) - 1; // 1023

private final PointValues.IntersectVisitor in;
private final QueryCancellation queryCancellation;
Expand Down

0 comments on commit 6b5fc35

Please sign in to comment.