Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.0.7, 4.1.4, 4.2.0, 4.3.0beta1
-
None
-
RHEL 5, MySQL 5.1, eZ Publish 4.2, eZDBCluster.
Description
From customer:
-----------------------------------------------
We are currently encountering a high number of db deadlocks resulting in fatal errors, usually when publishing content. This appears to be due to the update of the subnode modified time in the ezcontentobject_tree table.
During publishing this sometimes fails to gain a lock and results in a fatal error which is very disconcerting for editors within the system.
Is there a way to optimize this query using an IN statement instead of multiple node_id= in the WHERE clause? My explain query showed that the current statement is affecting all table rows, whereas the IN would affect only a handful.
This is becoming a real issue from a scalability perspective, is there any other mysql settings or changes we can make to avoid or remedy this deadlock situation?
-----------------------------------------------
Attached a patch that changes multiple "OR node_id = " to "node_id IN()" using eZDB::generateSQLINStatement().
Attachments
Issue Links
- relates to
-
EZP-19127 DB Deadlocks on ezcontentobject_tree when updating subnode
- Open
-
EZP-19917 Backoffice operations on large bulks of content fail sometimes
- Closed
-
EZP-20077 Modified Sub Node should not be in API
- Closed
-
EZP-15470 Transaction errors occur when objects are published concurrently
- Closed
-
EZP-15734 Transaction rollback on updating modified_subnode
- Closed