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

JournalArticleIndexer is always reindexing all versions of JournalArticle, causing throughput issues

    Details

      Description

      JournalArticleIndexer is always reindexing all versions of JournalArticle, causing throughput issues.

      See: doReindex(Object obj) => reindexArticleVersions(article) => getArticleVersions(article)

      By default, all versions are always indexed, but this is only necessary if modification affects to all webcontent versions (permission change, moving operations and categories/tags modifications)

      At LPS-46764, some indexation problems has been solved at delete operation

      Other problems remain unsolved, a reengineering process of JournalArticle must be done, in order to solve all problems

      Steps to reproduce:
      1. Create a web content with 2000 versions (see attached version_creation_script_groovy.txt to create wc versions)
      2. Create a web content with 1 version
      3. Check execution times between both created webcontent when doing some operations:

      • Create a new version of webcontent
      • Expire a old webcontent version
      • Publication of a scheduled webcontent
      • Expiration of a scheduled webcontent

      4. The difference between both wc will be about 200 times slower

      Original problem reported by a customer
      Adding new versions of a Web Content article is noticeably slower as a Web Content article has more versions. For instance, if there are 2000 Web Content article versions, publishing new versions takes 9-12 seconds. But if publishing a new article, it only takes .5-1 second. Minhchau tested the difference in time between a new article and one with 2000 versions and the below logs displays the difference between the two:

      For a Web Content article with 2000 versions:

      07:10:06,023 DEBUG [InvokerPortletImpl:?] processAction for 15 takes 12071 ms
      07:10:33,067 DEBUG [InvokerPortletImpl:?] processAction for 15 takes 11667 ms
      07:11:00,524 DEBUG [InvokerPortletImpl:?] processAction for 15 takes 11127 ms
      07:11:35,960 DEBUG [InvokerPortletImpl:?] processAction for 15 takes 10856 ms
      07:12:05,813 DEBUG [InvokerPortletImpl:?] processAction for 15 takes 11121 ms

      For a new Web Content article

      07:14:05,283 DEBUG [InvokerPortletImpl:?] processAction for 15 takes 54 ms
      07:14:25,086 DEBUG [InvokerPortletImpl:?] processAction for 15 takes 54 ms
      07:14:35,620 DEBUG [InvokerPortletImpl:?] processAction for 15 takes 67 ms
      07:14:46,504 DEBUG [InvokerPortletImpl:?] processAction for 15 takes 71 ms
      07:15:13,362 DEBUG [InvokerPortletImpl:?] processAction for 15 takes 80 ms

      As seen above, it's about 200 times longer to publish an article with 2000 versions than a brand new article with the exact same structure and content.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julio.camarero Julio Camarero (Inactive)
              Reporter:
              jorge.diaz Jorge Diaz
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 14 weeks, 1 day ago

                  Packages

                  Version Package