From 4d402932178af8b3dfd128e4d0377019597e4f90 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 8 Aug 2018 14:26:41 +0200 Subject: [PATCH] RedisWriter: dump all_parents_checksum and all_parents_checksums for zones --- lib/redis/rediswriter-objects.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/redis/rediswriter-objects.cpp b/lib/redis/rediswriter-objects.cpp index e7e49e525..69f808bbd 100644 --- a/lib/redis/rediswriter-objects.cpp +++ b/lib/redis/rediswriter-objects.cpp @@ -327,6 +327,15 @@ void RedisWriter::SendConfigUpdate(const ConfigObject::Ptr& object, bool useTran if (parentZone) checkSums->Set("parent_checksum", GetObjectIdentifier(parentZone)); + + Array::Ptr parents (new Array); + + for (auto& parent : zone->GetAllParentsRaw()) { + parents->Add(GetObjectIdentifier(parent)); + } + + checkSums->Set("all_parents_checksums", parents); + checkSums->Set("all_parents_checksum", HashValue(zone->GetAllParents())); } else { /* zone_checksum for endpoints already is calculated above. */