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

Viewing an announcements portlet can flood the database with queries if there are many sites

    Details

      Description

      Description
      Too many database queries are run when visiting a page with an Announcements portlet as a logged in user. This can cause performance issues.

      Steps to Reproduce

      1. Start Liferay and log in as the admin user.
      2. Add the announcements portlet to the home page.
      3. Click on the top-right corner tri-dot icon of the announcements portlet and go to Configuration.
      4. Under "Announcements Displayed", uncheck the box that says "Customize Announcements Displayed".
      5. Navigate to Control Panel > Server Administration > Scripts, and run the attached addManySites groovy script.
      6. Revisit the home page while still logged in. Monitor the db queries that are being run as the home page loads.

      Expected Results: There will be only be a few queries that are run.
      Actual Results: There are over twice as many queries as there are sites. This may lead to performance issues.

      Reproduced in:
      master (2605ba5ba89c29d969874317b8174d8980d1b704)
      ee-7.0.x (13a6daf7cbf7833e96b7942943353b75b02b52ba)
      ee-6.2.x (f55de9ba77b79dc0dd60e44c921a1aff395eb886)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 25 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP14
                  7.0.0 DXP SP3
                  7.0.3 CE GA4
                  7.0.X EE
                  7.1.X
                  Master