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 25 Wrap the mailing split_job function in a transaction to e… #11836

Merged
merged 1 commit into from
Mar 23, 2018

Conversation

seamuslee001
Copy link
Contributor

…nsure that there is no possibility of duplicate maiing jobs created

Overview

AUG ran into an issue where the split_job function was being run but subsequent process mailing jobs started processing the child jobs causing locks on the table which then created duplicate child jobs for the mailing. The aim of this is by wrapping it in a transaction other processes won't be able to block it / any errors will trigger a roll back.

ping @eileenmcnaughton @monishdeb would one of you be able to review this please?

@eileenmcnaughton
Copy link
Contributor

@seamuslee001 just spotted this https://github.com/seamuslee001/civicrm-core/blob/e28651449ece0fdce25069c523b0aa8810c3e1a7/CRM/Mailing/BAO/MailingJob.php#L381 - just need to move that up one line & the existing transaction can wrap it all

…nsure that there is no possibility of duplicate maiing jobs created

Include the split_jobs in the transaction used to update the parent job
@seamuslee001
Copy link
Contributor Author

@eileenmcnaughton have done so now

@eileenmcnaughton
Copy link
Contributor

I think this is now limited enough we can proceed to merge it once tests pass

@eileenmcnaughton eileenmcnaughton merged commit 6cd1c01 into civicrm:master Mar 23, 2018
@eileenmcnaughton eileenmcnaughton deleted the dev_core_25 branch March 23, 2018 01:07
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