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

JournalServiceVerifyProcess.verifyTree() causes OutOfMemoryException even with 10 GB heap

    Details

      Description

      With 370 000+ web content articles and upgrading the Liferay DXP JournalServiceVerifyProcess#verifyTree() causes OurOfMemoryException even with 10 GB heap.

      Steps to reproduce (hard way)

      1. Install Liferay 6.2
      2. Create 400000 webcontents
      3. Execute upgrade to master
        • Wrong behavior: a "java.lang.OutOfMemoryError: GC overhead limit exceeded" is thrown in "com.liferay.journal.verify.JournalServiceVerifyProcess" step
        • Expected behavior: no exception is thrown

      Steps to reproduce (easier way)

      1. Install Liferay 6.2 and create 10000 webcontents
      2. Execute upgrade to master before the commits that fixes this LPS
      3. Install again a new Liferay 6.2 with 10000 webcontent
      4. Execute upgrade to master after the commits that fixes this LPS
      5. Check upgrade times: upgrade times should be shorter after solving this LPS

      Solution
      JournalArticle verifyTree was added in LPS-22629 for Liferay 6.2 version.
      But it was not really necessary because both folderId and treePath in JournalArticle were added during 6.1 to 6.2 upgrade, so data of both fields are added during that upgrade and they should be correct.

      In order to avoid executing verifyTree during upgrade to 7.x:

      1. If you are upgrading from 6.1 to 7.x, as folderId and treePath was added during 6.1 to 6.2 upgrade. We can replace all verifyTree logic with following sql update:
        UPDATE JournalArticle SET treePath = '/'
      2. If you are upgrading from 6.2 to 7.x, due to LPS-49745, it is necessary to replace '/0/' with '/'. Other changes are not necessary, so for this upgrade, we can replace all verify Tree logic with following sql update:
        UPDATE JournalArticle SET treePath = '/' WHERE folderId=0 AND treePath='/0/'; 

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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

                  Packages

                  Version Package
                  7.0.0 DXP FP40
                  7.0.0 DXP SP7
                  7.0.5 CE GA6
                  7.0.X
                  7.1.0 M1
                  7.1.X
                  Master