Skip to content

[9.0] Remove unused parameter from AbstractSearchAsyncAction.onShardResult (#121887) #121891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 9.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ private void doPerformPhaseOnShard(int shardIndex, SearchShardIterator shardIt,
public void innerOnResponse(Result result) {
try {
releasable.close();
onShardResult(result, shardIt);
onShardResult(result);
} catch (Exception exc) {
onShardFailure(shardIndex, shard, shardIt, exc);
}
Expand Down Expand Up @@ -526,9 +526,8 @@ private static boolean isTaskCancelledException(Exception e) {
/**
* Executed once for every successful shard level request.
* @param result the result returned form the shard
* @param shardIt the shard iterator
*/
protected void onShardResult(Result result, SearchShardIterator shardIt) {
protected void onShardResult(Result result) {
assert result.getShardIndex() != -1 : "shard index is not set";
assert result.getSearchShardTarget() != null : "search shard target must not be null";
hasShardResponse.set(true);
Expand Down Expand Up @@ -732,7 +731,7 @@ void sendReleaseSearchContext(ShardSearchContextId contextId, Transport.Connecti
/**
* Executed once all shard results have been received and processed
* @see #onShardFailure(int, SearchShardTarget, Exception)
* @see #onShardResult(SearchPhaseResult, SearchShardIterator)
* @see #onShardResult(SearchPhaseResult)
*/
private void onPhaseDone() { // as a tribute to @kimchy aka. finishHim()
executeNextPhase(getName(), this::getNextPhase);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected void onShardGroupFailure(int shardIndex, SearchShardTarget shardTarget
}

@Override
protected void onShardResult(SearchPhaseResult result, SearchShardIterator shardIt) {
protected void onShardResult(SearchPhaseResult result) {
QuerySearchResult queryResult = result.queryResult();
if (queryResult.isNull() == false
// disable sort optims for scroll requests because they keep track of the last bottom doc locally (per shard)
Expand All @@ -123,7 +123,7 @@ && getRequest().scroll() == null
}
bottomSortCollector.consumeTopDocs(topDocs, queryResult.sortValueFormats());
}
super.onShardResult(result, shardIt);
super.onShardResult(result);
}

static SearchPhase nextPhase(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected void executePhaseOnShard(
SearchActionListener<SearchPhaseResult> listener
) {
onShardResult(new SearchPhaseResult() {
}, shardIt);
});
}

@Override
Expand Down