Insert into icinga_notifications and icinga_contactnotifications in one transaction
ref/IP/33683
I need a second pair of eyes. Why does this one insert notification_id:NULL into icinga_contactnotifications?
I think we need to insert into icinga_notifications before inserting into icinga_contactnotifcations. The reason for this is our ID cache. It's only getting filled AFTER the queries have been executed. This happens inside the callback of each query (which in all cases is FinishExecuteQuery()).
Setting callback: https://github.com/Icinga/icinga2/blob/e4bfb4898d312097e4c0364d17d31211006138cd/lib/db_ido_mysql/idomysqlconnection.cpp#L1182
Calling callback: https://github.com/Icinga/icinga2/blob/e4bfb4898d312097e4c0364d17d31211006138cd/lib/db_ido_mysql/idomysqlconnection.cpp#L612
Setting ID: https://github.com/Icinga/icinga2/blob/e4bfb4898d312097e4c0364d17d31211006138cd/lib/db_ido_mysql/idomysqlconnection.cpp#L1202
Don’t say... I INSERT icinga_notifications after icinga_contactnotifcations?
- Is this obsolete with #10065?
- Is this obsolete with Update
object#config_hashafter all relations queries #10065?
If this question was directed at me, then it is not. Whatever problem this is supposed to fix should not have been fixed by #10065, as neither the notifications nor contactnotifications IDO table contains a config hash column.