Skip to content
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

dev/core#2073 Remove memory leak in heavily tested (merge) code #18692

Merged
merged 1 commit into from
Oct 7, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Oct 7, 2020

Overview

dev/core#2073 Remove memory leak in heavily tested (merge) code

Before

Use of $dao->query($query); - which is a legacy pattern previously to cause memory leaks

After

  $dao = CRM_Core_DAO::executeQuery($query);

Technical Details

There are dozens of tests that pass through these lines - I used api_v3_JobTest:testBatchMerge to step through it

  • note the dao->affectedRows uses a query to determine that - so it is no more or less accurate than before

Comments

Example tests

message: 'Failure in api call for relationship create: yep it is tested'
severity: fail
...
not ok 1970 - Failure: api_v3_RelationshipTest::testRelationshipCreateDuplicateWithCustomFields

message: 'Failure in api call for relationship create: yep it is tested'
severity: fail
...
not ok 1971 - Failure: api_v3_RelationshipTest::testRelationshipCreateDuplicateWithCustomFields2

message: 'Failure in api call for relationship create: yep it is tested'
severity: fail

There are dozens of tests that pass through these lines - I used api_v3_JobTest:testBatchMerge to step through it
- note the dao->affectedRows uses a query to determine that - so it is no more or less accurate than before
@civibot
Copy link

civibot bot commented Oct 7, 2020

(Standard links)

@civibot civibot bot added the master label Oct 7, 2020
@seamuslee001 seamuslee001 merged commit 0957ca2 into civicrm:master Oct 7, 2020
@eileenmcnaughton eileenmcnaughton deleted the leak1 branch October 7, 2020 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants