mirror of https://github.com/Icinga/icinga2.git
Icinga DB: keep state checksums consistent
I.e. make hashes in hashmaps and stream the same.
This commit is contained in:
parent
5c10fffa3b
commit
8476627e91
|
@ -1526,9 +1526,9 @@ void IcingaDB::SendStatusUpdate(const Checkable::Ptr& checkable)
|
||||||
|
|
||||||
tie(host, service) = GetHostService(checkable);
|
tie(host, service) = GetHostService(checkable);
|
||||||
|
|
||||||
|
objectAttrs->Set("checksum", HashValue(objectAttrs));
|
||||||
objectAttrs->Set("redis_key", service ? "icinga:service:state" : "icinga:host:state");
|
objectAttrs->Set("redis_key", service ? "icinga:service:state" : "icinga:host:state");
|
||||||
objectAttrs->Set("runtime_type", "upsert");
|
objectAttrs->Set("runtime_type", "upsert");
|
||||||
objectAttrs->Set("checksum", HashValue(objectAttrs));
|
|
||||||
|
|
||||||
for (const Dictionary::Pair& kv : objectAttrs) {
|
for (const Dictionary::Pair& kv : objectAttrs) {
|
||||||
streamadd.emplace_back(kv.first);
|
streamadd.emplace_back(kv.first);
|
||||||
|
|
Loading…
Reference in New Issue