Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16340

DB Deadlocks on ezcontentobject_tree when updating subnode

    XMLWordPrintable

Details

    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

        Activity

          People

            patrick.allaert patrick.allaert
            gl gl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: