Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
6.4.7, 22.08.6, 23.02.2
-
None
Description
The test_qlafilter system test fails every now and then when the log file contains less lines than is expected. After adding some logging, it shows that the events are logged later on when the configuration modification causes the CGUpdater class to be destroyed. The practical result of this is that the log event handling might not flush things to disk as soon as possible. When either MaxScale is shut down or the filter is modified, the events will get written to disk.
If an update is posted to the GCUpdater right before it goes into wait_for_updates(), the notification for the update is lost as the function unconditionally overwrites the m_pData_rdy flag before waiting on the condition variable. In addition, the function inspects the emptiness of the local m_queue when the update could be posted on any of the SharedData instances associated with the GCUpdater.
The solution to this is to not inspect the local queue state and to only reset the data ready flag once the condition variable has been waited for.