From d67311bdcc89c20981e440cc4e80a16949691d56 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 29 Jun 2023 07:05:35 +0000 Subject: Only log information first 10 occurences and then every 100th. --- searchcore/src/vespa/searchcore/proton/matching/matcher.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'searchcore/src') diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp index 800d0d0aed8..24a5e8d2fea 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp @@ -46,7 +46,7 @@ namespace proton::matching { namespace { -constexpr long SECONDS_BEFORE_ALLOWING_SOFT_TIMEOUT_FACTOR_ADJUSTMENT = 60; +constexpr vespalib::duration SECONDS_BEFORE_ALLOWING_SOFT_TIMEOUT_FACTOR_ADJUSTMENT = 60s; // used to give out empty whitelist blueprints struct StupidMetaStore : search::IDocumentMetaStore { @@ -318,13 +318,14 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl if (adjustedDuration < vespalib::duration::zero()) { adjustedDuration = vespalib::duration::zero(); } - bool allowedSoftTimeoutFactorAdjustment = (std::chrono::duration_cast(my_clock::now() - _startTime).count() > SECONDS_BEFORE_ALLOWING_SOFT_TIMEOUT_FACTOR_ADJUSTMENT) + bool allowedSoftTimeoutFactorAdjustment = ((my_clock::now() - _startTime) > SECONDS_BEFORE_ALLOWING_SOFT_TIMEOUT_FACTOR_ADJUSTMENT) && ! isDoomExplicit; if (allowedSoftTimeoutFactorAdjustment) { _stats.updatesoftDoomFactor(request.getTimeout(), overtimeLimit, adjustedDuration); } + if ((_stats.softDoomed() < 10) || (_stats.softDoomed()%100 == 0)) LOG(info, "Triggered softtimeout %s. Coverage = %lu of %u documents. request=%1.3f, doomOvertime=%1.3f, overtime_limit=%1.3f and duration=%1.3f, rankprofile=%s" - ", factor %sadjusted from %1.3f to %1.3f", + ", factor %s adjusted from %1.3f to %1.3f", isDoomExplicit ? "with query override" : "factor adjustment", covered, numActiveLids, vespalib::to_s(request.getTimeout()), vespalib::to_s(my_stats.doomOvertime()), vespalib::to_s(overtimeLimit), vespalib::to_s(duration), -- cgit v1.2.3