Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292633

Use READ COMMITTED by default for MySQL transactions

$
0
0

I've run into an issue as a part of #937284: DEADLOCK errors on MergeQuery INSERT due to InnoDB gap locking when condition in SELECT ... FOR UPDATE results in 0 rows. If for some reason the db_merge() query fails, the current transaction is rolled back. This makes sense during most parts of a node save call, but makes no sense if a cache set fails. It also means that node save has a reference to a node that appears to be saved in code, but doesn't actually exist anymore in the database.

Since we ignore any exceptions that occur during the cache set, we may as well keep any transactions in progress alive as well. The attached patch starts a transaction right before we merge into the cache table.


Viewing all articles
Browse latest Browse all 292633

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>