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

IndexerRequestBuffer stores and executes duplicated index requests

    Details

      Description

      Inside IndexerRequestBuffer are stored all index request until commit is executed, but when a indexation of a object is requested more than one, duplicated requests are not removed.

      Steps to reproduce

      1. Activate debug traces for com.liferay.portal.search.internal.buffer (see LPS-64210)
      2. Create a new webcontent and save it
      3. Check log for DefaultIndexerRequestBufferExecutor traces:
        • Expected behavior: 4 index request are executed and there are duplicated indexation lines
        • Wrong behavior: 6 index request are executed and there are no duplicated indexation lines

      At following log, you can see that there are some equals requests:

      • Requests 0 and 1
      • Requests 4 and 5
        [DefaultIndexerRequestBufferExecutor:63] Executing indexer request 0: {classModel=null, forceSync=false, indexer=com.liferay.portal.search.buffer.NoAutoCommitIndexer, method=public abstract void com.liferay.portal.kernel.search.Indexer.reindex(java.lang.String,long) throws com.liferay.portal.kernel.search.SearchException, modelClassName=com.liferay.journal.model.JournalArticle, modelPrimaryKey=3103703}
        
        [DefaultIndexerRequestBufferExecutor:63] Executing indexer request 1: {classModel=null, forceSync=false, indexer=com.liferay.portal.search.buffer.NoAutoCommitIndexer, method=public abstract void com.liferay.portal.kernel.search.Indexer.reindex(java.lang.String,long) throws com.liferay.portal.kernel.search.SearchException, modelClassName=com.liferay.journal.model.JournalArticle, modelPrimaryKey=3103703}
        
        [DefaultIndexerRequestBufferExecutor:63] Executing indexer request 2: {classModel={uuid=e1c0201c-353b-4b2b-ccea-d34c99b97a6e, threadId=3103707, groupId=3103601, companyId=10202, userId=10601, userName=Admin Admin, createDate=Fri Apr 08 12:55:14 GMT 2016, modifiedDate=Fri Apr 08 12:55:14 GMT 2016, categoryId=-1, rootMessageId=3103706, rootMessageUserId=10601, messageCount=0, viewCount=0, lastPostByUserId=10601, lastPostDate=Fri Apr 08 12:55:14 GMT 2016, priority=0.0, question=false, lastPublishDate=null, status=0, statusByUserId=10601, statusByUserName=Admin Admin, statusDate=Fri Apr 08 12:55:14 GMT 2016}, forceSync=false, indexer=com.liferay.portal.search.buffer.NoAutoCommitIndexer, method=public abstract void com.liferay.portal.kernel.search.Indexer.reindex(java.lang.Object) throws com.liferay.portal.kernel.search.SearchException, modelClassName=com.liferay.message.boards.kernel.model.MBThread, modelPrimaryKey=3103707}
        
        [DefaultIndexerRequestBufferExecutor:63] Executing indexer request 3: {classModel={uuid=c3ca9c25-9aba-532e-6510-d345aa3d24a5, messageId=3103706, groupId=3103601, companyId=10202, userId=10601, userName=Admin Admin, createDate=Fri Apr 08 12:55:14 GMT 2016, modifiedDate=Fri Apr 08 12:55:14 GMT 2016, classNameId=10109, classPK=3103703, categoryId=-1, threadId=3103707, rootMessageId=3103706, parentMessageId=0, subject=3103703, body=3103703, format=html, anonymous=false, priority=0.0, allowPingbacks=false, answer=false, lastPublishDate=null, status=0, statusByUserId=10601, statusByUserName=Admin Admin, statusDate=Fri Apr 08 12:55:14 GMT 2016}, forceSync=false, indexer=com.liferay.portal.search.buffer.NoAutoCommitIndexer, method=public abstract void com.liferay.portal.kernel.search.Indexer.reindex(java.lang.Object) throws com.liferay.portal.kernel.search.SearchException, modelClassName=com.liferay.message.boards.kernel.model.MBMessage, modelPrimaryKey=3103706}
        
        [DefaultIndexerRequestBufferExecutor:63] Executing indexer request 4: {classModel= [....] }, forceSync=false, indexer=com.liferay.portal.search.buffer.NoAutoCommitIndexer, method=public abstract void com.liferay.portal.kernel.search.Indexer.reindex(java.lang.Object) throws com.liferay.portal.kernel.search.SearchException, modelClassName=com.liferay.journal.model.JournalArticle, modelPrimaryKey=3103702} [Sanitized]
        
        [DefaultIndexerRequestBufferExecutor:63] Executing indexer request 5: {classModel= [....] }, forceSync=false, indexer=com.liferay.portal.search.buffer.NoAutoCommitIndexer, method=public abstract void com.liferay.portal.kernel.search.Indexer.reindex(java.lang.Object) throws com.liferay.portal.kernel.search.SearchException, modelClassName=com.liferay.journal.model.JournalArticle, modelPrimaryKey=3103702} [Sanitized]
        

        Attachments

        1. fixed.png
          fixed.png
          38 kB
        2. reproduced.png
          reproduced.png
          81 kB

          Issue Links

            Activity

              People

              • Assignee:
                hong.zhao Hong Zhao
                Reporter:
                jorge.diaz Jorge Diaz
                Participants of an Issue:
                Recent user:
                André Ricardo Barreto de Oliveira
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 34 weeks, 3 days ago

                  Packages

                  Version Package
                  7.0.1 CE GA2