aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.cpp15
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.h62
2 files changed, 32 insertions, 45 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
index 2cb23965450..8de03411ea3 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
@@ -52,8 +52,9 @@ struct StupidMetaStore : search::IDocumentMetaStore {
void foreach(const search::IGidToLidMapperVisitor &) const override { }
};
-FeatureSet::SP findFeatureSet(const DocsumRequest &req,
- MatchToolsFactory &mtf, bool summaryFeatures) {
+FeatureSet::SP
+findFeatureSet(const DocsumRequest &req, MatchToolsFactory &mtf, bool summaryFeatures)
+{
std::vector<uint32_t> docs;
for (size_t i = 0; i < req.hits.size(); ++i) {
if (req.hits[i].docid != search::endDocId) {
@@ -300,8 +301,9 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl
coverage.degradeTimeout();
LOG(debug, "soft doomed, degraded from timeout covered = %lu", coverage.getCovered());
}
- LOG(debug, "numThreadsPerSearch = %zu. Configured = %d, estimated hits=%d, totalHits=%ld",
- numThreadsPerSearch, _rankSetup->getNumThreadsPerSearch(), estHits, reply->totalHitCount);
+ LOG(debug, "numThreadsPerSearch = %zu. Configured = %d, estimated hits=%d, totalHits=%ld , rankprofile=%s",
+ numThreadsPerSearch, _rankSetup->getNumThreadsPerSearch(), estHits, reply->totalHitCount,
+ request.ranking.c_str());
}
total_matching_time.stop();
my_stats.queryCollateralTime(total_matching_time.elapsed().sec() - my_stats.queryLatencyAvg());
@@ -311,8 +313,11 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl
std::lock_guard<std::mutex> guard(_statsLock);
_stats.add(my_stats);
if (my_stats.softDoomed()) {
- LOG(info, "Triggered softtimeout limit=%1.3f and duration=%1.3f", softLimit.sec(), duration.sec());
+ double old = _stats.softDoomFactor();
_stats.updatesoftDoomFactor(request.getTimeout(), softLimit, duration);
+ LOG(info, "Triggered softtimeout factor adjustment. limit=%1.3f and duration=%1.3f, rankprofile=%s"
+ ", factor adjusted from %1.3f to %1.3f",
+ softLimit.sec(), duration.sec(), request.ranking.c_str(), old, _stats.softDoomFactor());
}
}
return reply;
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.h b/searchcore/src/vespa/searchcore/proton/matching/matcher.h
index 8415f659473..4786e9f7f7c 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.h
@@ -18,23 +18,19 @@
#include <vespa/vespalib/util/thread_bundle.h>
#include <mutex>
-namespace search {
-namespace grouping {
+namespace search::grouping {
class GroupingContext;
class GroupingSession;
-} // namespace search::grouping;
-namespace index { class Schema; }
-namespace attribute { class IAttributeContext; }
-namespace engine {
+}
+namespace search::index { class Schema; }
+namespace search::attribute { class IAttributeContext; }
+namespace search::engine {
class Request;
class SearchRequest;
class DocsumRequest;
class SearchReply;
}
-
-class IDocumentMetaStore;
-
-} // namespace search
+namespace search { class IDocumentMetaStore; }
namespace proton::matching {
@@ -59,16 +55,13 @@ private:
uint32_t _distributionKey;
search::FeatureSet::SP
- getFeatureSet(const search::engine::DocsumRequest & req,
- ISearchContext & searchCtx,
+ getFeatureSet(const search::engine::DocsumRequest & req, ISearchContext & searchCtx,
search::attribute::IAttributeContext & attrCtx,
- SessionManager &sessionMgr,
- bool summaryFeatures);
+ SessionManager &sessionMgr, bool summaryFeatures);
std::unique_ptr<search::engine::SearchReply>
- handleGroupingSession(
- SessionManager &sessionMgr,
- search::grouping::GroupingContext & groupingContext,
- std::unique_ptr<search::grouping::GroupingSession> gs);
+ handleGroupingSession(SessionManager &sessionMgr,
+ search::grouping::GroupingContext & groupingContext,
+ std::unique_ptr<search::grouping::GroupingSession> gs);
size_t computeNumThreadsPerSearch(search::queryeval::Blueprint::HitEstimate hits,
const search::fef::Properties & rankProperties) const;
@@ -91,12 +84,9 @@ public:
* @param props ranking configuration
* @param clock used for timeout handling
**/
- Matcher(const search::index::Schema &schema,
- const search::fef::Properties &props,
- const vespalib::Clock &clock,
- QueryLimiter &queryLimiter,
- const IConstantValueRepo &constantValueRepo,
- uint32_t distributionKey);
+ Matcher(const search::index::Schema &schema, const search::fef::Properties &props,
+ const vespalib::Clock &clock, QueryLimiter &queryLimiter,
+ const IConstantValueRepo &constantValueRepo, uint32_t distributionKey);
const search::fef::IIndexEnvironment &get_index_env() const { return _indexEnv; }
@@ -112,8 +102,7 @@ public:
* function is exposed for testing purposes.
**/
std::unique_ptr<MatchToolsFactory>
- create_match_tools_factory(const search::engine::Request &request,
- ISearchContext &searchContext,
+ create_match_tools_factory(const search::engine::Request &request, ISearchContext &searchContext,
search::attribute::IAttributeContext &attrContext,
const search::IDocumentMetaStore &metaStore,
const search::fef::Properties &feature_overrides) const;
@@ -130,12 +119,9 @@ public:
* @param metaStore the document meta store used to map from lid to gid
**/
std::unique_ptr<search::engine::SearchReply>
- match(const search::engine::SearchRequest &request,
- vespalib::ThreadBundle &threadBundle,
- ISearchContext &searchContext,
- search::attribute::IAttributeContext &attrContext,
- SessionManager &sessionManager,
- const search::IDocumentMetaStore &metaStore,
+ match(const search::engine::SearchRequest &request, vespalib::ThreadBundle &threadBundle,
+ ISearchContext &searchContext, search::attribute::IAttributeContext &attrContext,
+ SessionManager &sessionManager, const search::IDocumentMetaStore &metaStore,
SearchSession::OwnershipBundle &&owned_objects);
/**
@@ -149,10 +135,8 @@ public:
* @return calculated summary features.
**/
search::FeatureSet::SP
- getSummaryFeatures(const search::engine::DocsumRequest & req,
- ISearchContext & searchCtx,
- search::attribute::IAttributeContext & attrCtx,
- SessionManager &sessionManager);
+ getSummaryFeatures(const search::engine::DocsumRequest & req, ISearchContext & searchCtx,
+ search::attribute::IAttributeContext & attrCtx, SessionManager &sessionManager);
/**
* Perform matching for the documents in the given docsum request
@@ -165,10 +149,8 @@ public:
* @return calculated rank features.
**/
search::FeatureSet::SP
- getRankFeatures(const search::engine::DocsumRequest & req,
- ISearchContext & searchCtx,
- search::attribute::IAttributeContext & attrCtx,
- SessionManager &sessionManager);
+ getRankFeatures(const search::engine::DocsumRequest & req, ISearchContext & searchCtx,
+ search::attribute::IAttributeContext & attrCtx, SessionManager &sessionManager);
/**
* @return true if this rankprofile has summary-features enabled