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

DB Deadlocks on ezcontentobject_tree when updating subnode

    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().

      1. ezcontentobjecttreenode.php-issue-6647.diff
        1 kB
        (inactive) Gunnstein Lye
      2. issue-16340-modified_subnode-master.diff
        3 kB
        (inactive) Gunnstein Lye

        Issue Links

          Activity

          (inactive) Gunnstein Lye created issue -
          André Rømcke made changes -
          Field Original Value New Value
          Link This issue relates to EZP-19917 [ EZP-19917 ]
          André Rømcke made changes -
          Link This issue relates to EZP-20077 [ EZP-20077 ]
          André Rømcke made changes -
          Workflow eZ Community Workflow [ 28925 ] eZ Engineering Scrumban Workflow [ 46093 ]
          André Rømcke made changes -
          Workflow eZ Engineering Scrumban Workflow [ 46093 ] EZ* Development Workflow [ 80541 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 80541 ] EZEE Development Workflow [ 119119 ]

            People

            • Assignee:
              Patrick Allaert
              Reporter:
              (inactive) Gunnstein Lye
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: