New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
During event processing only call const methods of Principal #12936
During event processing only call const methods of Principal #12936
Conversation
In order to support multiple threads interacting with one Event we need a way to identify those methods which must be thread-safe. Since the multiple threads would only happen when doing module processing, all such interactions now occur via the const interface of the Principals and their inheriting classes. This means we only have to make Principals const thread-safe.
LuminosityBlockPrincipal and RunPrincipal had identical implementations for the function readImmediate. This was moved to Principal base class and renamed readAllFromSourceAndMergeImmediately
Added specific unsafe_ methods which are const methods that change the state of the object. These are ones that will have to be modified to become thread-safe.
When we are processing Paths during the event loop we only want to call thread-safe functions of ProductHolders. By switching to only calling 'const' functions during that time we can concentrate on making ProductHolders const thread-safe.
Switched the Principal to use a container using the propatage_const wrapper so we can guarantee we call only const methods of a ProductHolderBase.
Somehow this file was deleted as part of an earlier commit
A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_8_0_X. It involves the following packages: DataFormats/Common @cmsbuild, @smuzaffar, @Dr15Jones, @davidlange6 can you please review it and eventually sign? Thanks. Following commands in first line of a comment are recognized
|
please test |
The tests are being triggered in jenkins. |
-1 Tested at: cfe0481 ---> test runtestRecoEgammaPhotonIdentification had ERRORS you can see the results of the tests here: The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
The test failure is not from this pull request. The test failed because of an Xrootd time out failure. |
Please test |
The tests are being triggered in jenkins. |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_8_0_X IBs after it passes the integration tests. This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar |
-1 Tested at: cfe0481 ---> test runtestRecoEgammaPhotonIdentification had ERRORS you can see the results of the tests here: |
The same xrootd fallback errors happened
|
@davidlange6 please merge this change since the failed test is not caused by this change. I need this committed before I make additional commits. Thanks. |
@davidlange6 FWIW I also need this committed before i make additional commits. Thanks. |
During event processing only call const methods of Principal
During the portion of the event loop where the framework is interacting with modules we now only call const methods of the Principal. Therefore to make it safe to use multiple threads per event we just need to make Principal const thread-safe.