Affects Version/s: 7.0.X EE, 7.0.X, Master
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)
- Install Liferay 6.2
- Create 400000 webcontents
- Execute upgrade to master
- : a "java.lang.OutOfMemoryError: GC overhead limit exceeded" is thrown in "com.liferay.journal.verify.JournalServiceVerifyProcess" step
- : no exception is thrown
Steps to reproduce (easier way)
- Install Liferay 6.2 and create 10000 webcontents
- Execute upgrade to master before the commits that fixes this LPS
- Install again a new Liferay 6.2 with 10000 webcontent
- Execute upgrade to master after the commits that fixes this LPS
- Check upgrade times: upgrade times should be shorter after solving this LPS
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:
- 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:
- 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: