Skip to content

Commit

Permalink
fix segment terminate early flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sijuv committed Jan 29, 2025
1 parent 4ad621e commit 87f146d
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,12 @@ private Collector buildAndRunCollectorChain(
qr.setPartialResults(true);
qr.setTerminatedEarly(true);
} finally {
if (earlyTerminatingSortingCollector != null) {
qr.setSegmentTerminatedEarly(earlyTerminatingSortingCollector.terminatedEarly());
}
if (cmd.isQueryCancellable()) {
core.getCancellableQueryTracker().removeCancellableQuery(cmd.getQueryID());
}
if (collector instanceof final EarlyTerminatingCollector earlyTerminatingCollector) {
if (earlyTerminatingCollector.isTerminatedEarly()) {
qr.setTerminatedEarly(true);
}
}
}
if (collector instanceof DelegatingCollector) {
((DelegatingCollector) collector).complete();
Expand Down

0 comments on commit 87f146d

Please sign in to comment.