summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-06-29 07:05:35 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-06-29 07:05:35 +0000
commitd67311bdcc89c20981e440cc4e80a16949691d56 (patch)
tree5a292b7b441a01cfeaec340ebe80df2581da2fdc /searchcore
parent943849d98f9d1d72ec5b1b0fda3a01ae64cb1ada (diff)
Only log information first 10 occurences and then every 100th.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.cpp7
1 files changed, 4 insertions, 3 deletions
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<std::chrono::seconds>(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),