Problem/Motivation
By default, Drupal uses the REPEATABLE READ
transaction isolation level - this results in lots of deadlock errors.
Drupal.org and many other high traffic sites use READ COMMITTED
, so default to that instead. Drupal commerce has been recommended READ COMMITTED
since before 2014.
Steps to reproduce
In some circumstances, drush cr + loading a single page in a browser can be enough to trigger a deadlock.
Proposed resolution
Do 2 things:
- Add the possibility for siteowners to set the transaction isolation level in the database settings array in
setttings.php
; - Change the default transaction isolation level for new sites from
REPEATABLE READ
toREAD COMMITTED
.
Remaining tasks
TBD
User interface changes
In the database configuration for MySQL, MariaDB or equivalent databases in the installation proces can now the transaction isolation level be set.
API changes
The transaction isolation level can be set in the database settings array in setttings.php
Data model changes
None
Release notes snippet
TBD