make sure to log failures in search when reducing results
This commit is contained in:
parent
61034f5c86
commit
9f44c93a25
|
@ -156,7 +156,11 @@ public class TransportSearchDfsQueryAndFetchAction extends TransportSearchTypeAc
|
|||
try {
|
||||
innerFinishHim();
|
||||
} catch (Exception e) {
|
||||
listener.onFailure(new ReduceSearchPhaseException("query_fetch", "", e, buildShardFailures()));
|
||||
ReduceSearchPhaseException failure = new ReduceSearchPhaseException("query_fetch", "", e, buildShardFailures());
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("failed to reduce search", failure);
|
||||
}
|
||||
listener.onFailure(failure);
|
||||
} finally {
|
||||
searchCache.releaseDfsResults(dfsResults);
|
||||
searchCache.releaseQueryFetchResults(queryFetchResults);
|
||||
|
|
|
@ -249,7 +249,11 @@ public class TransportSearchDfsQueryThenFetchAction extends TransportSearchTypeA
|
|||
try {
|
||||
innerFinishHim();
|
||||
} catch (Exception e) {
|
||||
listener.onFailure(new ReduceSearchPhaseException("fetch", "", e, buildShardFailures()));
|
||||
ReduceSearchPhaseException failure = new ReduceSearchPhaseException("fetch", "", e, buildShardFailures());
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("failed to reduce search", failure);
|
||||
}
|
||||
listener.onFailure(failure);
|
||||
} finally {
|
||||
releaseIrrelevantSearchContexts(queryResults, docIdsToLoad);
|
||||
searchCache.releaseDfsResults(dfsResults);
|
||||
|
|
|
@ -163,7 +163,11 @@ public class TransportSearchQueryThenFetchAction extends TransportSearchTypeActi
|
|||
try {
|
||||
innerFinishHim();
|
||||
} catch (Exception e) {
|
||||
listener.onFailure(new ReduceSearchPhaseException("fetch", "", e, buildShardFailures()));
|
||||
ReduceSearchPhaseException failure = new ReduceSearchPhaseException("fetch", "", e, buildShardFailures());
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("failed to reduce search", failure);
|
||||
}
|
||||
listener.onFailure(failure);
|
||||
} finally {
|
||||
releaseIrrelevantSearchContexts(queryResults, docIdsToLoad);
|
||||
searchCache.releaseQueryResults(queryResults);
|
||||
|
|
|
@ -206,7 +206,13 @@ public class TransportSearchScrollScanAction extends AbstractComponent {
|
|||
try {
|
||||
innerFinishHim();
|
||||
} catch (Exception e) {
|
||||
listener.onFailure(new ReduceSearchPhaseException("fetch", "", e, buildShardFailures(shardFailures, searchCache)));
|
||||
ReduceSearchPhaseException failure = new ReduceSearchPhaseException("fetch", "", e, buildShardFailures(shardFailures, searchCache));
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("failed to reduce search", failure);
|
||||
}
|
||||
listener.onFailure(failure);
|
||||
} finally {
|
||||
searchCache.releaseQueryFetchResults(queryFetchResults);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,7 +245,6 @@ public class TransportSearchScrollScanAction extends AbstractComponent {
|
|||
// we rebuild the scroll id since we remove shards that we finished scrolling on
|
||||
scrollId = TransportSearchHelper.buildScrollId(this.scrollId.type(), queryFetchResults.values(), this.scrollId.attributes()); // continue moving the total_hits
|
||||
}
|
||||
searchCache.releaseQueryFetchResults(queryFetchResults);
|
||||
listener.onResponse(new SearchResponse(internalResponse, scrollId, this.scrollId.context().length, successfulOps.get(),
|
||||
System.currentTimeMillis() - startTime, buildShardFailures(shardFailures, searchCache)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue