-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Centralise payload ptr ownership for condition updating workflows #35048
Centralise payload ptr ownership for condition updating workflows #35048
Conversation
…utService interface
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35048/24919
|
A new Pull Request was created by @ggovi for master. It involves the following packages:
@malbouis, @civanch, @yuanchao, @tlampen, @mdhildreth, @cmsbuild, @jpata, @slava77, @ggovi, @pohsun, @francescobrivio, @tvami can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@@ -333,7 +333,7 @@ class ConditionDBWriter : public edm::EDAnalyzer { | |||
edm::LogInfo("ConditionDBWriter") << "appending a new object to tag " << Record_ << " in since mode " << std::endl; | |||
|
|||
// The Framework will take control over the DB object now, therefore the release. |
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.
Now this comment is not in line with what's below it, right?
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.
Yes it is wrong. Maybe, since it is a file that I have modified, better remove it. Good catch.
Please test |
fixes #28699 |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ccfe70/18100/summary.html CMS StaticAnalyzer warnings: There are 2 EventSetupRecord::get warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ccfe70/18100/llvm-analysis/esrget-sa.txt for details. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35048/24954
|
+alca |
This pull request is fully signed and it will be integrated in one of the next master IBs after it passes the integration tests. This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ccfe70/18134/summary.html CMS StaticAnalyzer warnings: There are 2 EventSetupRecord::get warnings. See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ccfe70/18134/llvm-analysis/esrget-sa.txt for details. Comparison SummarySummary:
|
Interesting that GitHub didn't want the signatures again! Maybe changing comments doesn't trigger new signatures? |
@@ -580,8 +580,6 @@ void CorrPCCProducer::dqmEndRunProduce(edm::Run const& runSeg, const edm::EventS | |||
throw std::runtime_error("PoolDBService required."); | |||
} | |||
|
|||
delete pccCorrections; |
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.
This deletion can (must) be avoided here because writeOne is used in its "deprecated" form: correct?
Shouldn't you try to move to the "non deprecated" form with the reference as argument, instead of the pointer?
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.
@perrotta The idea was to minimise the changes in this PR, and leave to the various code authors the migration to the new interface. Here we clearly had to options: 1. Remove the delete and leave the old interface 2. Leave the delete and move to new (reference-based) interface. I think 2 would not be fully satisfactory since we would be left with the use of pointers that has no justification. So, we should also remove the use of pointers.
It is curious that signatures were not reset after the last update in #35048 (comment) : @smuzaffar @mrodozov can you see any issue in the bot? |
@perrotta , bot uses the timestamp of the latest commit and based on that it reset's the signatures. I think in this case the commit pushed were older than the signature comments |
+1
|
PR description:
A review of the overall CMSSW client code of the DBOutputService interface for creating/updating condition data sets (sequences of pairs iov/payload ), has found that the clients are mostly assuming (wrongly) the service to take over the ownership, resulting in a generalised memory leak.
Only few classes are currently implementing the policy correctly.
To cope with that, I propose the following changes:
These new methods are used in this PR to migrate the code of the clients already holding the payload ptr ownership. In addition, all of the other clients, currently not freeing the payload memory, will be asked to move to this interface. This change will improve the overall memory management and the code readability.
PR validation:
Unit tests/Integration test/O2O tests