From 8476627e9178558806fcef9730a957128e618a84 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 29 Jul 2021 12:43:40 +0200 Subject: [PATCH] Icinga DB: keep state checksums consistent I.e. make hashes in hashmaps and stream the same. --- lib/icingadb/icingadb-objects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index 7267dbc8b..60a970b2f 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -1526,9 +1526,9 @@ void IcingaDB::SendStatusUpdate(const Checkable::Ptr& checkable) tie(host, service) = GetHostService(checkable); + objectAttrs->Set("checksum", HashValue(objectAttrs)); objectAttrs->Set("redis_key", service ? "icinga:service:state" : "icinga:host:state"); objectAttrs->Set("runtime_type", "upsert"); - objectAttrs->Set("checksum", HashValue(objectAttrs)); for (const Dictionary::Pair& kv : objectAttrs) { streamadd.emplace_back(kv.first);