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

Implementing asynchronous reindex for updating DDMStructure.

    Details

      Description

      It is not uncommon that some customers have reached a situation where one structure is associated with thousands of web contents.

      Even if we change the property " journal.articles.index.all.versions" to false, there could still be a lot of web contents to be reindexed.

      This impedes user experience because only if the reindex is done, the user can update the structure successfully and get page back to be alive.

      So if we can do asynchronous reindex for updating DDMStructure, the situation can be improved

      Steps to Test
      After this fix has been committed, you can test that it works by taking the following actions:

      1. Start up the portal on a fresh database.
      2. Navigate to Admin > Control Panel > Configuration > Server Administration > Script
      3. Run the attached addStructureAndTemplateWith1000WebContents.groovy Groovy script. (Note: the script may take several minutes to complete)
      4. Navigate to Site Administration > Content > Web Content > Manage > Structures > Test Structure > Actions > Edit.
      5. Add a Boolean field to the Structure and click Save.
      6. Observe the length of time it takes to finish saving (it took a little over 10 seconds in my testing).
      7. Shut down the portal.
      8. Add the following line to your portal-ext.properties file:
        dynamic.data.mapping.structure.index.with.thread=true
        
      9. Start up the portal.
      10. Navigate to Site Administration > Content > Web Content > Manage > Structures > Test Structure > Actions > Edit.
      11. Add another Boolean field to the Structure and click Save.
      12. Observe the length of time it takes to finish saving. If the fix works, it should finish saving almost instantly (in my testing, it took about 1 second). If it takes the same amount of time it took to finish saving in step 6, the fix didn't work.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              harry.chai Harry Chai
              Reporter:
              john.zhao John Zhao (Inactive)
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 29 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP13
                  7.0.0 DXP SP3
                  7.0.3 CE GA4