aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-11-02 16:26:07 +0100
committerHenning Baldersheim <balder@oath.com>2018-11-02 16:26:07 +0100
commit2ab2e7b2023bcb54107cce436336395d87f512ef (patch)
tree388b1a519fdc8d911dc557f60cf8750215621571 /searchcore
parent066d4cd87284df2661bac982cc48199f99024607 (diff)
Also estimate active docs when enabling adaptive timeout.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp5
1 files changed, 3 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 206d798f294..16308ed22f9 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
@@ -889,13 +889,14 @@ FastS_FNET_Search::CheckCoverage()
}
}
}
+ bool missingReplies = (askedButNotAnswered != 0) || (nodesQueried != nodesReplied);
const ssize_t missingParts = cntNone - (_dataset->getSearchableCopies() - 1);
- if ((missingParts > 0) && (cntNone != _nodes.size())) {
+ if (((missingParts > 0) && (cntNone != _nodes.size())) || (missingReplies && useAdaptiveTimeout())) {
// TODO This is a dirty way of anticipating missing coverage.
// It should be done differently
activeDocs += missingParts * activeDocs/(_nodes.size() - cntNone);
}
- if ((askedButNotAnswered != 0) || (nodesQueried != nodesReplied)) {
+ if (missingReplies && useAdaptiveTimeout()) {
degradedReason |= search::engine::SearchReply::Coverage::ADAPTIVE_TIMEOUT;
}
_util.SetCoverage(covDocs, activeDocs, soonActiveDocs, degradedReason, nodesQueried, nodesReplied);