From 392fd8a75cfe32a0583157d28d39a65174b8e14d Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 26 Jul 2021 17:30:38 +0200 Subject: [PATCH] Icinga DB: HDEL from *:state with same prio as HSET ... to ensure the right modifications order per key. --- lib/icingadb/icingadb-objects.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index 2fe33d05a..655f53c40 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -1484,14 +1484,13 @@ void IcingaDB::SendConfigDelete(const ConfigObject::Ptr& object) auto checkable (dynamic_pointer_cast(object)); if (checkable) { - m_Rcon->FireAndForgetQueries({ - { - "ZREM", - dynamic_pointer_cast(checkable) ? "icinga:nextupdate:service" : "icinga:nextupdate:host", - GetObjectIdentifier(checkable) - }, - {"HDEL", m_PrefixConfigObject + typeName + ":state", objectKey}, + m_Rcon->FireAndForgetQuery({ + "ZREM", + dynamic_pointer_cast(checkable) ? "icinga:nextupdate:service" : "icinga:nextupdate:host", + GetObjectIdentifier(checkable) }, Prio::CheckResult); + + m_Rcon->FireAndForgetQuery({"HDEL", m_PrefixConfigObject + typeName + ":state", objectKey}, Prio::RuntimeStateSync); } }