-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Change transaction isolation to 'READ COMMITTED' #246
Comments
Can confirm. Checked two of my Pantheon/Drupal sites, and the Lando sites have a warning about this in the Drupal Status Report. |
Updating the default mysql.conf in the recipe seems like the way to go, although the MariaDB docs have me a little confused...says that |
Alright, here's what I've been trying today.
I edit
I've added
in several variations. Commenting out the [mariadb] group, putting quotes around READ-COMMITTED, using
Am I in the correct place? |
This might work:
|
Putting it under [mysqld] doesn't help. Nor [mysql] without the d. Nor the spaces. According to https://mariadb.com/kb/en/set-transaction/ it's |
I believe adjusting the server configuration might be the wrong layer to address this. The application configuration can be made in Addressing it at the server might seem convenient, but can also have impact outside of the intended change, eg:
The linked Drupal docs do suggest the server configuration as preferred, but for safety's sake I'd take that to refer to the hosting environment, not development environments. To my mind this is best considered an application concern. If we know that Pantheon's DB server configuration matches the configuration in #248, then making a matching change to the Pantheon plugin makes sense. Ref #248 (comment) |
Interesting. I see that in The WordPress site I have on Pantheon does have transaction isolation level set to READ COMMITTED and I have no idea how that's done either. (WordPress is not my strength anymore.) So, looking into changing something related to If I drop the following into that (new to me) file and
The I'm not sure if this is a file the |
READ COMMITTED does appear to be the platform-wide default on Pantheon, which is a completely reasonable default for any version of Drupal or Wordpress. |
Okay, mucked around with this for a few hours, thinking the In
The idea being, we just imported the db, let's set the transaction isolation level with SQL. And it works. You don't even have to So my question is, is this an acceptable way to do this? If so, I'll submit a proper PR. |
Certainly seems better than nothing, although it bothers me that there isn't a way to set it in a universal fashion that would account for other DB import strategies. I'm guessing you've tried every variant in the book @ethangeorgi, but was this (config suggested to me by the almighty AI) one of them?
|
No luck with that either. Tried |
As per:
https://www.drupal.org/docs/getting-started/system-requirements/setting-the-mysql-transaction-isolation-level
The current transaction isolation level being set is
REPEATABLE READ
. On Pantheon environments it is set toREAD COMMITTED
The text was updated successfully, but these errors were encountered: