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

New Indexer Architecture silently aborts full reindex in case an Exception is thrown inside _indexerDocumentBuilder.getDocument method

Details

    Description

      New Indexer Architecture silently aborts full reindex in case an Exception is thrown inside _indexerDocumentBuilder.getDocument method

      Old "BaseIndexer" architecture catched and traced errors during the indexation of a single object, so the whole full reindex operation wasn't interrupted, for example:

      This code was added in LPS-56190 in almost all indexers:

      But new indexer architecture doesn't have any try...catch code, for example:

      So in case an unexpected exception is thrown inside that method, the whole full reindex operation is silently aborted.

      This can be very problematic in case a customer upgrades from an old Liferay version and they have database inconsistencies in some database entries that causes indexation errors. The expected behavior should be to only ignore problematic entries, but current behavior is the whole process is aborted.

      Steps to reproduce DLFileEntry

      1. Upload 10 or more files to document library
      2. Stop Liferay
      3. Go to database and delete one random entry in DLFileVersion table, in order to have a DLFileEntry record without any DLFileVersion
      4. Start Liferay
      5. Execute a full reindex
      6. Check logs:
        • Expected behavior: A warning trace is written to log file for the the DLFileEntry record without any DLFileVersion but reindex operation is not aborted (all entries are indexed except problematic one)
        • Wrong behavior: No warning trace is written to log file and reindex operation is not aborted (entries before the problematic one are the only indexed)

      Steps to reproduce MBMessage

      1. Go to Message Boards functionality and create several threads with messages
      2. Stop Liferay
      3. Go to database and delete one random entry in MBThread table, in order to have a MBMessage record without its MBThread entry.
      4. Start Liferay
      5. Execute a full reindex
      6. Check logs:
        • Expected behavior: A warning trace is written to log file for the the MBMessage record without any MBThread but reindex operation is not aborted (all entries are indexed except problematic one)
        • Wrong behavior: No warning trace is written to log file and reindex operation is not aborted (entries before the problematic one are the only indexed)

      This issue could be reproduced with any other entity in case an unexpected exception is thrown due to a database inconsistence

       

      Attachments

        Issue Links

          Activity

            People

              brooke.dalton Brooke Dalton
              jorge.diaz Jorge Diaz
              Marta Elicegui Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                2 years, 48 weeks, 1 day ago

                Packages

                  Version Package
                  7.1.10 DXP FP17
                  7.1.10.4 SP4
                  7.1.X
                  7.2.10 DXP FP5
                  7.2.10.2 DXP SP2
                  7.2.X
                  7.3.1 CE GA2
                  7.3.2 CE GA3
                  7.3.10 DXP GA1
                  Master