diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-03-11 17:43:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-11 17:43:29 +0100 |
commit | 41731a3f9f206e6ab24c3e8fe0e448ff84648936 (patch) | |
tree | b6f3b62c766ee42dc1379dbc482783bcb3b26a30 /searchcore | |
parent | fa11ec1fcdd72ab75d26d9ab95f5942c2162cdcc (diff) | |
parent | 6fe99f37a23731913ac470daee4ecc75bd60670b (diff) |
Merge pull request #8732 from vespa-engine/balder/timeout-or-error
Enable that we can see the difference between query error and timeout.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/matcher.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp index 4ebf74c373f..a65e7eae784 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp @@ -100,10 +100,11 @@ Matcher::getFeatureSet(const DocsumRequest & req, ISearchContext & searchCtx, IA SessionManager & sessionMgr, bool summaryFeatures) { SessionId sessionId(&req.sessionId[0], req.sessionId.size()); + bool expectedSessionCached(false); if (!sessionId.empty()) { const Properties &cache_props = req.propertiesMap.cacheProperties(); - bool searchSessionCached = cache_props.lookup("query").found(); - if (searchSessionCached) { + expectedSessionCached = cache_props.lookup("query").found(); + if (expectedSessionCached) { SearchSession::SP session(sessionMgr.pickSearch(sessionId)); if (session) { MatchToolsFactory &mtf = session->getMatchToolsFactory(); @@ -118,8 +119,9 @@ Matcher::getFeatureSet(const DocsumRequest & req, ISearchContext & searchCtx, IA MatchToolsFactory::UP mtf = create_match_tools_factory(req, searchCtx, attrCtx, metaStore, req.propertiesMap.featureOverrides()); if (!mtf->valid()) { - LOG(warning, "getFeatureSet(%s): query execution failed (invalid query). Returning empty feature set", - (summaryFeatures ? "summary features" : "rank features")); + LOG(warning, "getFeatureSet(%s): query execution failed (%s). Returning empty feature set", + (summaryFeatures ? "summary features" : "rank features"), + (expectedSessionCached) ? "session has expired" : "invalid query"); return std::make_shared<FeatureSet>(); } return findFeatureSet(req, *mtf, summaryFeatures); |