Skip to content

Make IOVSvcTool::handle vaguely re-entrant

Walter Lampl requested to merge wlampl/athena:IOVSvcPlay into master

This MR is an attempt to fix ATR-22684.

The (unproven) suspicion is that the IOVSvcTool triggers suprious callbacks when the incident handler is concurrently exectued in multiple threads. With this MR, the handle-method gets a bit more reentrant. Full re-entrancy is hard to achieve but at least the sections of the incident-handler that get executed after the first event should be re-entrant. The most important change is to get rid of the m_currTime class member to store the IOVTime of the current event. There are other code-changes, in particular the updates std::map-access methods, that are leftovers from an (failed) attempt to get full const-correctness and re-entrancy.

A bit of background info: We were hoping to get rid of IOV-callbacks alltogether in the MT migration. But at least in the short-term, we have to support IOV-callbacks that are fired only once, in the beginning of the job. The infrastructure has to be sufficiently thread-safe to support this use-case.

cc @leggett, @tsulaia, @emoyse and @elmsheus

Merge request reports