Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-26983

Large amounts of data in portlet preferences can lead to a deadlock during upgrade

    Details

      Description

      Problem:
      The upgrade for portletpreferences table does not take into consideration huge amounts of data. Doing an upgrade fails when a large amount of data (say 120,000 rows) are part of the table. When the database runs the select statement, it does a read lock on the row. Then it tries to update the row by first doing a write lock. Some databases will realize that the read has finished, and the allow the write lock and subsequent update to the row, while others (like SQL Server) will hold the update until the thread for the read lock is finished. However, the thread for the read lock won't finish until the write statements to the whole table are done. There is a big chance of deadlock happening.

      Proposed solution:
      Reuse the connection to see if that fixes the issue.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.saechang Michael Saechang
              Reporter:
              jonas.choi Jonas Choi
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 50 weeks ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  6.2.0 CE M2