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

A local service available before its indexer can result in entities saved in the database but not in the index

    Details

    • Fix Priority:
      3

      Description

      Local services can be available before a corresponding indexer is active. As a result, these local services can save content in the database and yet not index the content into Elasticsearch (or Solr). It happens a bunch of times with portal instance lifecycle listeners, which often are running in a state where the service is available, but not the indexer.

      Steps to reproduce

      This behavior is sometimes the root cause of bugs such as LPS-96294 and LPS-89026.

      Workaround

      If you are having problems because your code uses a local service before an indexer is available, and your code is in a DS, you can add a reference to the indexer, so the DS will only be available when both the service and the indexer are available.

      References

      We have an integration test that reproduces this behavior in https://github.com/vagnerbc/liferay-portal/blob/13d8a7bb3f386141069badcf5792b7463c7f5d0e/modules/apps/company/company-test/src/testIntegration/java/com/liferay/company/search/test/DefaultDDLStructuresPortalInstanceTest.java#L183

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                support-lep@liferay.com SE Support
                Reporter:
                adam.brandizzi Adam Brandizzi
                Participants of an Issue:
                Recent user:
                Balázs Sáfrány-Kovalik
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  23 weeks, 3 days ago

                  Packages

                  Version Package