Fix data race in EventHeaderCreator #224
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BEGINRELEASENOTES
EventHeaderCreator
and make it ready for GaudiHiveENDRELEASENOTES
A
static
local variable was not thread safe and resulting in a data race when used in parallel environment of GaudiHive (skipping or duplicating event numbers).I considered two ways to fix it:
EventContex
to get the event number as seen by scheduler. Currently supplying theEventContex
as input tok4FWCore::Transformer
is not allowed so the algorithm will stay in non-functional form. If there is any filtering done by some algorithms earlier in the sequence then this will be not reflected in the event number as it's determined as the scheduler starts this event. If two events are loaded from input the ordering of event numbers given to them will be the same as ordering of loading.In both cases the event numbers in the output will be not sorted.
The version with with
EventContext
is used currently but can be changed if needed