Open Al2Klimov opened 3 months ago
No, I'm not! I haven't even checked all of them in detail, but aren't they just like the other superfluous ones from Checkable::ExecuteCheck()
and used to enforce the scheduler to re-index its idle checkables queue?
I don't think so.
Especially these two re-schedule the next check of other checkables as something happened with the current one. The other HA node may be responsible for them, so of course this matters for the cluster. But IMAO this doesn't matter for our backends. I think we can stop our anti-SetNextCheck witch-hunt here.
The other HA node may be responsible for them, so of course this matters for the cluster.
We literally trigger an OnNewCheckResult
event just two lines below the highlighted code, which is synced and goes into the same code path on the other node.
In addition, CheckerComponent::NextCheckChangedHandler needs these two (not suppressed!) events too, so that these next_check updates are effective at all.
Honestly, I don't understand why you're turning down all the suggestions, just to stick to the first idea that came to your mind. Let's be real, no one said this should work out right away with either suggestions. However, compared to adding yet another useless cluster event, this could be a much better solution. We already have enough problems with the countless/unpredictable RPC messages to deal with. So, why add yet another one when there's a better alternative?
I'm not saying these SetNextCheck
calls are useless, but you should first minimise the places where this method is called. After that, we can discuss how these remaining 2-3 calls should be handled. If you are only concerned about these two calls, then two additional Icinga DB events are nothing to me if we can reduce the load on the cluster as a result.
Actually I'm totally fine with both (https://github.com/Icinga/icinga2/issues/10082#issuecomment-2298640579) a new event or a flag in the existing one. Also, I just said (https://github.com/Icinga/icinga2/pull/10093#issuecomment-2377330210) these events are needed locally. For the latter we could add flag(s) to setters and event handlers, so that the latter can say: Oh, this event is not for broadcasting, so I won't send it as cluster message. Ok?
refs #10082
How does this relate to that issue now? If this PR was merged as-is, how would you address that bug?
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.
refs #10082
TODO