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

Concurrency issue with mail collection #204

Open
jhedstrom opened this issue Dec 4, 2018 · 0 comments
Open

Concurrency issue with mail collection #204

jhedstrom opened this issue Dec 4, 2018 · 0 comments

Comments

@jhedstrom
Copy link
Owner

We use core's TestMailCollector for email collection. This simply injects emails into the key_value table by way of the system.test_mail_collector state. When Behat tests are running concurrently, database lock issues can result when too many emails are trying to be written into the same state variable:

General error: 1205 Lock wait timeout exceeded; try restarting transaction: UPDATE {key_value} SET value=:db_update_placeholder_0
WHERE (name = :db_condition_placeholder_0) AND (collection = :db_condition_placeholder_1); Array
(
    [:db_update_placeholder_0] => a:2:{i:0;a:13:{s:2:"id";s:34:"user_register_no_approval_required";s:6:"module";s:4:"user";s:3:"key";s:29:"register_no_approval_required";s:2:"to";s:24:"[email protected]";s:4:"from";s:21:"[email protected]";s:8:"reply-to";s:21:"[email protected]";s:8:"langcode";s:2:"en";s:6:"params";a:1:{s:7:"account";O:23:"Drupal\user\Entity\User":27:{s:9:" in 

One possible solution would be to implement our own collection that can utilize a randomized state variable per-instance (not sure if this is possible or not with the core email system).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant