Skip to content

Commit

Permalink
Don't broadcast Checkable#next_check updates made just not to check t…
Browse files Browse the repository at this point in the history
…wice

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.
  • Loading branch information
Al2Klimov committed Sep 26, 2024
1 parent 9d9f1de commit 6533a50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/icinga/checkable-check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6533a50

Please sign in to comment.