From 6533a50ae7c6a2d9826171b26378908856e32f6a Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 20 Jun 2024 18:09:54 +0200 Subject: [PATCH] Don't broadcast Checkable#next_check updates made just not to check twice The checker sorts Checkables by next_check while picking the next due one, so we (already) have to advance next_check while starting a check. But the second master doesn't need this info, as it's not responsible. --- lib/icinga/checkable-check.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp index 2bbc4df4ccc..2a394570e81 100644 --- a/lib/icinga/checkable-check.cpp +++ b/lib/icinga/checkable-check.cpp @@ -563,11 +563,11 @@ void Checkable::ExecuteCheck() SetLastCheckStarted(Utility::GetTime()); - /* This calls SetNextCheck() which updates the CheckerComponent's idle/pending + /* This calls SetNextCheck() for a later update of the CheckerComponent's idle/pending * queues and ensures that checks are not fired multiple times. ProcessCheckResult() * is called too late. See #6421. */ - UpdateNextCheck(); + UpdateNextCheck(nullptr, true); bool reachable = IsReachable(); @@ -636,7 +636,7 @@ void Checkable::ExecuteCheck() * a check result from the remote instance. The check will be re-scheduled * using the proper check interval once we've received a check result. */ - SetNextCheck(Utility::GetTime() + GetCheckCommand()->GetTimeout() + 30); + SetNextCheck(Utility::GetTime() + GetCheckCommand()->GetTimeout() + 30, true); /* * Let the user know that there was a problem with the check if