diff --git a/lib/redis/rediswriter-objects.cpp b/lib/redis/rediswriter-objects.cpp index 698205715..c8941c519 100644 --- a/lib/redis/rediswriter-objects.cpp +++ b/lib/redis/rediswriter-objects.cpp @@ -93,14 +93,13 @@ void RedisWriter::UpdateAllConfigObjects(void) if (!ctype) continue; - if (ctype->GetObject(name)) - continue; - deleteQuery.push_back("icinga:config:" + type + ":" + name); deleteQuery.push_back("icinga:status:" + type + ":" + name); } } while (cursor != 0); + ExecuteQuery({ "MULTI" }); + if (deleteQuery.size() > 1) ExecuteQuery(deleteQuery); @@ -125,6 +124,8 @@ void RedisWriter::UpdateAllConfigObjects(void) ExecuteQuery({ "PUBLISH", "icinga:config:dump", typeName }); } + ExecuteQuery({ "EXEC" }); + Log(LogInformation, "RedisWriter") << "Initial config/status dump finished in " << Utility::GetTime() - startTime << " seconds."; }