Skip to content

Commit

Permalink
remove TODO and clarify comments
Browse files Browse the repository at this point in the history
  • Loading branch information
javanna committed Aug 8, 2023
1 parent 2844a05 commit 5959f83
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public ContextIndexSearcher(
this.leafSlices = null;
} else {
// we offload to the executor unconditionally, including requests that don't support concurrency
// TODO are we good offloading aggs that don't support concurrency to the concurrent executor or is postCollect an issue?
//the few cases that don't support offloading entirely won't get an executor
this.leafSlices = computeSlices(getLeafContexts(), maximumNumberOfSlices, minimumDocsPerSlice);
assert this.leafSlices.length <= maximumNumberOfSlices : "more slices created than the maximum allowed";
}
Expand Down Expand Up @@ -368,7 +368,7 @@ private <C extends Collector, T> T search(Weight weight, CollectorManager<C, T>
if (state.compareAndSet(0, 1)) {
// A slice throws exception or times out: cancel all the tasks, to prevent slices that haven't started yet from
// starting and performing needless computation.
// TODO we will also want to cancel tasks that have already started, reusing the search cancellation mechanics.
// TODO we will also want to cancel tasks that have already started, reusing the timeout mechanism
try {
search(Arrays.asList(leaves), weight, collector);
if (timeExceeded) {
Expand Down

0 comments on commit 5959f83

Please sign in to comment.