Closed yhabteab closed 1 month ago
I.e., before: SendConfigUpdateHeavy() updates the object itself, calls OnConfigUpdateHeavy(). Have fun with race conditions.
After: SendConfigUpdateHeavy() NULLs config hash, calls OnConfigUpdateHeavy(), updates the object itself.
Just added some additional comments!
The IDO is writing the checksums of all
Host
or/andService
attributes, including group memberships, to the database when the object is first created or, one of its attributes e.g.enable_flapping_detection
changes. However, when either the Icinga 2 or the MySQL service is stopped/reloaded unexpectedly right after the IDO has written the checksums to the database but before the remaining queries of the group memberships are executed, the group members will never be written to the database until someone modifies one of the object attributes.This PR defers the
config_hash
column update until all object relationships have been updated/inserted.Master:
config_hash
column, and ...hostgroup_members
,servicegroup_members
etc.This PR:
config_hash
, butconfig_hash
is set toNULL
hostgroup_members
,servicegroup_members
etc.config_hash
column to the current in memory value.closes #8813 ref/IP/53530