summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-11-07 11:12:41 +0100
committerHenning Baldersheim <balder@oath.com>2018-11-07 11:12:41 +0100
commit00edec1a4ea45cf7a04fa772126d03e951502682 (patch)
tree5fcabe5f42ee2337a997f6b2d70fe36891e1fc4b /searchcore
parent9863899ffe849ad7af74759977fbf2640b0add93 (diff)
properly compute coverage on adaptive timeout.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
index 73b92eaa2b7..03d2b140b78 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
@@ -891,12 +891,15 @@ FastS_FNET_Search::CheckCoverage()
}
bool missingReplies = (askedButNotAnswered != 0) || (nodesQueried != nodesReplied);
const ssize_t missingParts = cntNone - (_dataset->getSearchableCopies() - 1);
- if (((missingParts > 0) || (missingReplies && useAdaptiveTimeout())) && (cntNone != _nodes.size())) {
+ if ((missingParts > 0) && (cntNone != _nodes.size())) {
// TODO This is a dirty way of anticipating missing coverage.
// It should be done differently
activeDocs += missingParts * activeDocs/(_nodes.size() - cntNone);
}
- if (missingReplies && useAdaptiveTimeout()) {
+ if (missingReplies && useAdaptiveTimeout() && nodesReplied) {
+ // TODO This will not be correct when using multilevel dispatch and has timeout on anything, but leaf level.
+ // We can live with that as leaf level failures are the likely ones.
+ activeDocs += askedButNotAnswered * activeDocs/nodesReplied;
degradedReason |= search::engine::SearchReply::Coverage::ADAPTIVE_TIMEOUT;
}
_util.SetCoverage(covDocs, activeDocs, soonActiveDocs, degradedReason, nodesQueried, nodesReplied);