summaryrefslogtreecommitdiff
path: root/src/mongo/db/process_health/health_observer_base.cpp
diff options
context:
space:
mode:
authorAndrew Shuvalov <andrew.shuvalov@mongodb.com>2021-11-10 22:44:09 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-10 23:18:15 +0000
commit7673b195c85582a7a8295f508ae61cc50bb9c628 (patch)
treecb6c647ea3e382c9955381a4ddcf9115c70015f9 /src/mongo/db/process_health/health_observer_base.cpp
parent195bfdd18bdfba1b98beb28628cef19d48d335de (diff)
downloadmongo-7673b195c85582a7a8295f508ae61cc50bb9c628.tar.gz
SERVER-61368 SERVER-61315 Ldap health check executor should support aborted tasks; test refactorings
Diffstat (limited to 'src/mongo/db/process_health/health_observer_base.cpp')
-rw-r--r--src/mongo/db/process_health/health_observer_base.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/process_health/health_observer_base.cpp b/src/mongo/db/process_health/health_observer_base.cpp
index 04f38f51daa..dbe49da4ed4 100644
--- a/src/mongo/db/process_health/health_observer_base.cpp
+++ b/src/mongo/db/process_health/health_observer_base.cpp
@@ -42,7 +42,6 @@ HealthObserverBase::HealthObserverBase(ServiceContext* svcCtx) : _svcCtx(svcCtx)
void HealthObserverBase::periodicCheck(FaultFacetsContainerFactory& factory,
std::shared_ptr<executor::TaskExecutor> taskExecutor,
CancellationToken token) {
-
// If we have reached here, the intensity of this health observer must not be off
{
auto lk = stdx::lock_guard(_mutex);
@@ -52,6 +51,10 @@ void HealthObserverBase::periodicCheck(FaultFacetsContainerFactory& factory,
const auto now = _svcCtx->getPreciseClockSource()->now();
if (now - _lastTimeTheCheckWasRun < minimalCheckInterval()) {
+ LOGV2_DEBUG(6136802,
+ 3,
+ "Safety interval prevented new health check",
+ "observerType"_attr = getType());
return;
}
_lastTimeTheCheckWasRun = now;