Merge pull request #8917 from Icinga/bugfix/idb-state-del-prio

Icinga DB: HDEL from *:state with same prio as HSET
This commit is contained in:
Noah Hilverling 2021-07-28 11:08:10 +02:00 committed by GitHub
commit ff2abaa687
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -1490,14 +1490,13 @@ void IcingaDB::SendConfigDelete(const ConfigObject::Ptr& object)
auto checkable (dynamic_pointer_cast<Checkable>(object));
if (checkable) {
m_Rcon->FireAndForgetQueries({
{
"ZREM",
dynamic_pointer_cast<Service>(checkable) ? "icinga:nextupdate:service" : "icinga:nextupdate:host",
GetObjectIdentifier(checkable)
},
{"HDEL", m_PrefixConfigObject + typeName + ":state", objectKey},
m_Rcon->FireAndForgetQuery({
"ZREM",
dynamic_pointer_cast<Service>(checkable) ? "icinga:nextupdate:service" : "icinga:nextupdate:host",
GetObjectIdentifier(checkable)
}, Prio::CheckResult);
m_Rcon->FireAndForgetQuery({"HDEL", m_PrefixConfigObject + typeName + ":state", objectKey}, Prio::RuntimeStateSync);
}
}