From 315a08ed9f58c1bcd5f1970c76c85890ce93240e Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 30 Sep 2021 12:48:35 +0200 Subject: [PATCH] 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,