From 3e5dfa9607bf142d8d6aa5936de94bdb0493e45d Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Wed, 27 Jan 2021 13:27:14 +0100 Subject: [PATCH] IdoCheckTask: Don't override checkable critical with warn state --- lib/db_ido/idochecktask.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/db_ido/idochecktask.cpp b/lib/db_ido/idochecktask.cpp index d16c91b0c..66c5076c6 100644 --- a/lib/db_ido/idochecktask.cpp +++ b/lib/db_ido/idochecktask.cpp @@ -165,7 +165,7 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult if (missingQueriesCritical.IsEmpty() && qps < queriesCritical) { msgbuf << " " << qps << " queries/s lower than critical threshold (" << queriesCritical << " queries/s)."; - state= ServiceCritical; + state = ServiceCritical; } else if (missingQueriesWarning.IsEmpty() && qps < queriesWarning) { msgbuf << " " << qps << " queries/s lower than warning threshold (" << queriesWarning << " queries/s)."; @@ -181,7 +181,9 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult msgbuf << " " << pendingQueries << " pending queries greater than warning threshold (" << pendingQueriesWarning << " queries)."; - state = ServiceWarning; + if (state == ServiceOK) { + state = ServiceWarning; + } } cr->SetPerformanceData(new Array({