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

Automatic recycle bin cleaning is causing huge amount of DB quieries

    Details

      Description

      Automatic recycle bin cleaning is causing huge amount of DB quieries, if there are lot rows at Group table at DB.

      Even trash.enabled=false disabling recycle bin from properties file dos not help nor setting trash.entry.check.interval= very high. Since it is anyways doing that on startup.

      Requirement to reproduce:

      Start Liferay and add huge amount of sites and users (like 50 000).

      Then suddenly you find out that db is hitting huge amount of queries and your computer performance is decreasing. From database you see following kind of queries:

      select trashentry0_.entryId as entryId458_, trashentry0_.groupId as groupId458_, trashentry0_.companyId as companyId458_, trashentry0_.userId as userId458_, trashentry0_.userName as userName458_, trashentry0_.createDate as createDate458_, trashentry0_.classNameId as classNam7_458_, trashentry0_.classPK as classPK458_, trashentry0_.systemEventSetKey as systemEv9_458_, trashentry0_.typeSettings as typeSet10_458_, trashentry0_.status as status458_ from TrashEntry trashentry0_ where (trashentry0_.groupId=1052961 )AND(trashentry0_.createDate<'2014-01-06 09:15:08' ) order by  trashentry0_.createDate DESC

      You cannot disable this from portal.properties either by setting trash.enabled=false

      It seems to lead to following implementation:

      https://github.com/liferay/liferay-portal/blob/37fbd2edc6cc08c869896d843caa9d59fe2f890e/portal-impl/src/com/liferay/portlet/trash/service/impl/TrashEntryLocalServiceImpl.java#L128-156

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mark.jin Mark Jin (Inactive)
              Reporter:
              sampsa.sohlman Sampsa Sohlman (Inactive)
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Votes:
              4 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 28 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1