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
Fix thread safety issues in SwitchProducer ProductResolvers #28686
Conversation
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28686/13257
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
…oductResolver putProduct_() should never be called fro SwitchAliasProductResolver, which means that the infrastructure to support putProduct_() is not common for the two. Moving the function to SwitchProducerProductResolver makes the intentions more clear. Also remove a useless return from updateProvenance().
Found by checking provenance from SwitchProducer-in-Path as well
dec71aa
to
9890e15
Compare
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28686/13258
|
A new Pull Request was created by @makortel (Matti Kortelainen) for master. It involves the following packages: FWCore/Framework @cmsbuild, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
1 similar comment
A new Pull Request was created by @makortel (Matti Kortelainen) for master. It involves the following packages: FWCore/Framework @cmsbuild, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild, please test |
The tests are being triggered in jenkins. |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28686/13263
|
Pull request #28686 was updated. @cmsbuild, @smuzaffar, @Dr15Jones can you please check and sign again. |
@cmsbuild, please test |
The tests are being triggered in jenkins. |
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos, @silviodonato (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR fixes three thread safety issues in SwitchProducer ProductResolvers that I realized while addressing #28680
SwitchBaseProductResolver::prefetchRequested_
is now re-set tofalse
inresetProductData_()
ProductData::unsafe_setWrapper()
in the prefetching phase as suggested by @Dr15Jones in Thread safety issue in SwitchBaseProductResolver::resolveProductImpl #28680ProductData
at the time of the call, after which the tasks for the product consumers are spawned.SwitchBaseProductResolver::waitingTasks_
is reset inresetProductData_()
In addition this PR
putProduct_()
fromSwitchBaseProductResolver
toSwitchProducerProductResolver
putProduct_()
should never be called fromSwitchAliasProductResolver
(and now throws an exception)updateProvenance()
to a proper place inSwitchProducerProductResolver
Fixes #28680.
PR validation:
Code compiles, unit tests run.