HltROBDataProviderSvc: Avoid copying ROBFragments in eventCache_addRobData

Avoid copying ROBFragment objects and use a different mode of tbb::concurrent_unordered_map insertion instead of operator[] with assignment. Not entirely sure why but this seems to fix ATR-22380 which was supposedly caused by copy-insertion race condition:

For concurrent_unordered_map, insert and emplace methods may create a temporary item that is destroyed if another thread inserts an item with the same key concurrently.

https://software.intel.com/content/www/us/en/develop/documentation/tbb-documentation/top/intel-threading-building-blocks-developer-reference/containers/concurrentunorderedmap-and-concurrentunorderedmultimap-template-classes.html

Tested at P1 in Technical Run 15 - the crash was not seen with this patch.

cc @wiedenma

Merge request reports

Loading