Checkable#ProcessCheckResult(): only clean up ack comments older than check result

Normally if for some reason an ack comment still exists on a checkable not
acked anymore, still clean it up. But while replaying log config objects
incl. ack comments come before check results and acks. I.e. 1) ack comment,
2) DOWN check result and 3) ack. Not 1) DOWN check result, 2) ack and 3) ack
comment. So the checkable is temporarily not acked, but already has the ack
comment. In this case the DOWN check result which is older than the ack
comment shall not clean up the latter.
This commit is contained in:
Alexander A. Klimov 2023-03-03 12:07:37 +01:00
parent c160c4b62e
commit 6dffc57a37

View File

@ -319,7 +319,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
olock.Unlock();
if (remove_acknowledgement_comments)
RemoveAckComments();
RemoveAckComments(String(), cr->GetExecutionEnd());
Dictionary::Ptr vars_after = new Dictionary({
{ "state", new_state },