mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-20 03:45:02 +00:00
Add comment why we check for null fetch results during merge
This commit is contained in:
parent
457a76c1c6
commit
0c465b1931
@ -304,6 +304,10 @@ public final class SearchPhaseController extends AbstractComponent {
|
||||
ScoreDoc shardDoc = sortedDocs[scoreDocIndex];
|
||||
SearchPhaseResult searchResultProvider = resultsLookup.apply(shardDoc.shardIndex);
|
||||
if (searchResultProvider == null) {
|
||||
// this can happen if we are hitting a shard failure during the fetch phase
|
||||
// in this case we referenced the shard result via teh ScoreDoc but never got a
|
||||
// result from fetch.
|
||||
// TODO it would be nice to assert this in the future
|
||||
continue;
|
||||
}
|
||||
FetchSearchResult fetchResult = searchResultProvider.fetchResult();
|
||||
@ -358,6 +362,10 @@ public final class SearchPhaseController extends AbstractComponent {
|
||||
ScoreDoc shardDoc = sortedDocs[i];
|
||||
SearchPhaseResult fetchResultProvider = resultsLookup.apply(shardDoc.shardIndex);
|
||||
if (fetchResultProvider == null) {
|
||||
// this can happen if we are hitting a shard failure during the fetch phase
|
||||
// in this case we referenced the shard result via teh ScoreDoc but never got a
|
||||
// result from fetch.
|
||||
// TODO it would be nice to assert this in the future
|
||||
continue;
|
||||
}
|
||||
FetchSearchResult fetchResult = fetchResultProvider.fetchResult();
|
||||
|
Loading…
x
Reference in New Issue
Block a user