-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 propagation of an earlier exception in Transformer #40879
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40879/34349
|
A new Pull Request was created by @makortel (Matti Kortelainen) for master. It involves the following packages:
@cmsbuild, @smuzaffar, @Dr15Jones, @makortel can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild, please test |
@Dr15Jones What do you think? |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ebc98f/30893/summary.html Comparison SummarySummary:
|
@@ -27,6 +28,8 @@ | |||
process.maxEvents.input = 4 | |||
|
|||
process.start = cms.EDProducer("IntProducer", ivalue = cms.int32(1)) | |||
if args.exception: | |||
process.start = cms.EDProducer("FailingProducer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the test failure is in what is consumed and not in the actual transform call its.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, basically from anywhere in the data dependence chain of the module registering the transformation call.
// products were actually produced and which not, because the | ||
// transforming products are never produced by time of commit_() | ||
// by construction. | ||
if (edp) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the putProduct call always get a null wrapper? Or does the later call also call putProduct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The putProduct()
call from Event::commit_()
cmssw/FWCore/Framework/src/Event.cc
Lines 170 to 175 in ff2213a
for (auto index : iShouldPut) { | |
auto resolver = p.getProductResolverByIndex(index); | |
if (not resolver->productResolved()) { | |
dynamic_cast<ProductPutterBase const*>(resolver)->putProduct(std::unique_ptr<WrapperBase>()); | |
} | |
} |
will always have a null wrapper. The Transformer itself calls
putProduct()
via EventPrincipal::put()
cmssw/FWCore/Framework/src/EventPrincipal.cc
Line 209 in ff2213a
dynamic_cast<ProductPutterBase const*>(phb)->putProduct(std::move(edp)); |
cmssw/FWCore/Framework/src/EventForTransformer.cc
Lines 22 to 26 in ff2213a
void EventForTransformer::put(ProductResolverIndex index, | |
std::unique_ptr<WrapperBase> edp, | |
BasicHandle const& iGetHandle) { | |
eventPrincipal_.put(index, std::move(edp), iGetHandle.provenance()->productProvenance()->parentageID()); | |
} |
Written that, I see now an alternative to customizing putProduct()
that would be to customize (in some way) productResolved()
to return true
for Transformer. The productResolved()
seems to be called only in {Event,LuminosityBlock,Run,ProcessBlock}::commit_()
, but on a first thought "lying" in productResolved()
sounds conceptually worse than leaving the status unaltered in putProduct()
.
I'm coming to the conclusion that this is the least bad (quick) way, and given the "plan" to revisit the transformation ability in a context of more general memory space handling, and revisiting the Event system internals to make them more flexible, I would not spend much more time with this fix now. |
3f397f0
to
b70e365
Compare
Rebased to fix a conflict. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40879/34596
|
Pull request #40879 was updated. @cmsbuild, @smuzaffar, @Dr15Jones, @makortel can you please check and sign again. |
@cmsbuild, please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ebc98f/31250/summary.html Comparison SummarySummary:
|
Another incarnation of #39803 |
+core |
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. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR proposes a possible fix for #40868.
PR validation:
FWCore/Integration
unit tests pass