From 315a08ed9f58c1bcd5f1970c76c85890ce93240e Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 30 Sep 2021 12:48:35 +0200 Subject: [PATCH 1/2] Icinga DB: sync checkables along with their states first `WorkQueue#ParallelFor(x, false, y)` will enqueue x's items in FIFO order, so x has to start with host and service. --- lib/icingadb/icingadb-objects.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index f1f6b5f09..7fe26761e 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -44,17 +44,22 @@ INITIALIZE_ONCE(&IcingaDB::ConfigStaticInitialize); std::vector IcingaDB::GetTypes() { + // The initial config sync will queue the types in the following order. return { - CheckCommand::TypeInstance, - Comment::TypeInstance, + // Sync them first to get their states ASAP. + Host::TypeInstance, + Service::TypeInstance, + + // Then sync them for similar reasons. Downtime::TypeInstance, + Comment::TypeInstance, + + CheckCommand::TypeInstance, Endpoint::TypeInstance, EventCommand::TypeInstance, - Host::TypeInstance, HostGroup::TypeInstance, Notification::TypeInstance, NotificationCommand::TypeInstance, - Service::TypeInstance, ServiceGroup::TypeInstance, TimePeriod::TypeInstance, User::TypeInstance, From 8c187088193b11ff7ce8ea190e72f2f89ead2706 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 9 Nov 2021 11:15:28 +0100 Subject: [PATCH 2/2] Icinga DB: Sync groups earlier Host and service groups are structural information that are used for Web filters and should therefore be synchronized as soon as possible. --- lib/icingadb/icingadb-objects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index 7fe26761e..865dba08c 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -54,13 +54,13 @@ std::vector IcingaDB::GetTypes() Downtime::TypeInstance, Comment::TypeInstance, + HostGroup::TypeInstance, + ServiceGroup::TypeInstance, CheckCommand::TypeInstance, Endpoint::TypeInstance, EventCommand::TypeInstance, - HostGroup::TypeInstance, Notification::TypeInstance, NotificationCommand::TypeInstance, - ServiceGroup::TypeInstance, TimePeriod::TypeInstance, User::TypeInstance, UserGroup::TypeInstance,