From 4f125753bff73771e0cd1e20549f175c7dc652a4 Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Tue, 28 Jun 2022 11:30:48 +0200 Subject: [PATCH] Icinga DB Check: ignore suppressed queries in Redis backlog check If some kind of query is not supposed to be processed at the moment, there is little point in checking it. During a full dump, state updates are suppressed (i.e. delayed), so when a dump takes very long, this would have resulted in a false Redis backlog warning. --- lib/icingadb/redisconnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/icingadb/redisconnection.cpp b/lib/icingadb/redisconnection.cpp index f4c21a60f..d9233ca77 100644 --- a/lib/icingadb/redisconnection.cpp +++ b/lib/icingadb/redisconnection.cpp @@ -250,7 +250,7 @@ double RedisConnection::GetOldestPendingQueryTs() double oldest = 0; for (auto& queue : m_Queues.Writes) { - if (!queue.second.empty()) { + if (m_SuppressedQueryKinds.find(queue.first) == m_SuppressedQueryKinds.end() && !queue.second.empty()) { auto ctime (queue.second.front().CTime); if (ctime < oldest || oldest == 0) {