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
(cherry picked from commit 6b5fc35e4458e60a7ca5822584ec6a60562f2c01)
This commit is contained in:
Marios Trivyzas 2020-03-18 14:52:03 +01:00
parent 0732475cb9
commit d56dee599a
No known key found for this signature in database
GPG Key ID: 8817B46B0CF36A3F
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ class ExitableDirectoryReader extends FilterDirectoryReader {
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;