You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UpdateAllObjects() puts lots of stuff in m_QueryQueue
puts a callback in m_QueryQueue
that callback logs "Finished reconnecting"
So at least the MySQL IDO fires all initial queries and then logs "Finished reconnecting" – right? Wrong!
The MySQL IDO indeed TRIES to fire those queries before logging "Finished reconnecting". But if any of them yet misses an ID of a parent object (which is to be inserted by a query not fired yet), it lands again in m_QueryQueue AFTER logging "Finished reconnecting".
To Reproduce
Kick off a full dump (empty DB) of a bunch of hosts + services + notifications, etc.
Watch number of pending queries and "Finished reconnecting"
Expected behavior
Either – or:
(Simple solution) IdoMysqlConnection#Reconnect() puts a callback in m_QueryQueue which puts a callback in m_QueryQueue which logs "Finished reconnecting"
(Less simple solution) "Finished reconnecting" callback checks whether all items from DbConnection#UpdateAllObjects() are done (atomic counter needed), otherwise it re-enqueues itself
(Least simple solution) Putting a callback in m_QueryQueue which logs "Finished reconnecting" happens not directly in IdoMysqlConnection#Reconnect(), but in a Shared<Defer> – all m_QueryQueue items from DbConnection#UpdateAllObjects() hold pointers to that Defer
Describe the bug
At least IdoMysqlConnection#Reconnect():
So at least the MySQL IDO fires all initial queries and then logs "Finished reconnecting" – right? Wrong!
The MySQL IDO indeed TRIES to fire those queries before logging "Finished reconnecting". But if any of them yet misses an ID of a parent object (which is to be inserted by a query not fired yet), it lands again in m_QueryQueue AFTER logging "Finished reconnecting".
To Reproduce
Expected behavior
Either – or:
Your Environment
icinga2 --version
): fe85bf1icinga2 feature list
): ido-mysqlAdditional context
One shouldn't need the above insider knowledge to know when the IDO actually "Finished reconnecting".
The text was updated successfully, but these errors were encountered: