Page MenuHomePhabricator

Tag removal triggers unrestricted dedupe query
Closed, ResolvedPublic

Event Timeline

mepps created this task.Feb 13 2019, 6:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 13 2019, 6:37 PM
mepps added a comment.Feb 13 2019, 7:41 PM

I was able to replicate this in the Contact Summary Layout Major Gifts uses. When I tried to add tags, it froze and then locked up the database.

mepps added a comment.Feb 13 2019, 9:43 PM

So the query that gets bogged down is in CRM_Dedupe_BAO_RuleGroup.php on line 204. Note that if it goes through a similar but not identical query on line 198 the db does not get locked in the same way. It looks like all Contact profile forms end up deduping, though I'm not sure why.

@mepps so it probably is kinda going the wrong path :-( The former path should be for when you only have one contact id

I guess $this-params must be empty ... for some reason

Change 490507 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm/civicrm@master] Fix extraneous slow dedupe call when no deduping to do

https://gerrit.wikimedia.org/r/490507

Change 490507 merged by jenkins-bot:
[wikimedia/fundraising/crm/civicrm@master] Fix extraneous slow dedupe call when no deduping to do

https://gerrit.wikimedia.org/r/490507

Ejegg added a comment.Feb 15 2019, 2:01 AM

@NNichols, @Eileenmcnaughton found a fix for this, and it's now deployed. You should now be able to delete tags without bringing things crashing to a halt!

Upstream PR https://github.com/civicrm/civicrm-core/pull/13606 ( I did a refactor first which is already merged so it looks kinda different

Thank you all! I just tried it and worked without issue.

Eileenmcnaughton closed this task as Resolved.Feb 19 2019, 9:12 PM