mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-31 01:24:19 +02:00
Drop obsolete delete query on config dump
This commit is contained in:
parent
e31679b2de
commit
48f1ce215b
@ -113,6 +113,7 @@ void RedisWriter::UpdateAllConfigObjects(void)
|
|||||||
|
|
||||||
ExecuteQuery({ "MULTI" });
|
ExecuteQuery({ "MULTI" });
|
||||||
|
|
||||||
|
/* Delete obsolete object keys first. */
|
||||||
auto& deleteQuery = deleteQueries[type.get()];
|
auto& deleteQuery = deleteQueries[type.get()];
|
||||||
|
|
||||||
if (deleteQuery.size() > 1)
|
if (deleteQuery.size() > 1)
|
||||||
@ -120,9 +121,6 @@ void RedisWriter::UpdateAllConfigObjects(void)
|
|||||||
|
|
||||||
String typeName = type->GetName().ToLower();
|
String typeName = type->GetName().ToLower();
|
||||||
|
|
||||||
/* replace into aka delete insert is faster than a full diff */
|
|
||||||
ExecuteQuery({ "DEL", m_PrefixConfigObject + typeName, m_PrefixConfigCheckSum + typeName, m_PrefixStatusObject + typeName });
|
|
||||||
|
|
||||||
/* fetch all objects and dump them */
|
/* fetch all objects and dump them */
|
||||||
for (const ConfigObject::Ptr& object : ctype->GetObjects()) {
|
for (const ConfigObject::Ptr& object : ctype->GetObjects()) {
|
||||||
SendConfigUpdate(object, false);
|
SendConfigUpdate(object, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user