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

Upgrade to 7.1: v1_1_3.UpgradeDDMStorageLink executes one SQL update per DDMStorageLink record when only one for all records is needed

    Details

      Description

      Steps to reproduce it:

      1. Startup 7.0 or DXP
      2. Go to Documents and Media and create a new document type with one field
      3. Create 1000 documents based on that document type
      4. Upgrade to master/7.1

      Results:
      The process v1_1_3.UpgradeDDMStorageLink takes a lot of time.

      Expected results:
      The process v1_1_3.UpgradeDDMStorageLink takes just a few seconds to be completed.

      Technical explanation:
      The process v1_1_3.UpgradeDDMStorageLink updates the structureVersionId in the table DDMStorageLink adding the proper value for all the records with the same structureId:

      update DDMStorageLink set structureVersionId = ? where structureId = ?
      

      However we are currently executing the previous update once per DDMStorageLink record and this means, for example, that having 100000 documents generated for a document type we will execute the same update 100000 times instead of just one.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 5 weeks, 3 days ago

                  Packages

                  Version Package
                  7.1.X
                  Master