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

Reindex is triggered everytime upon user login when admin.sync.default.associations is enabled

    Details

      Description

      Reindex is triggered every time upon user login when admin.sync.default.associations is enabled.  This is a performance issue only, since the portal functions correctly regardless of the reindex.

      Code related: https://github.com/liferay/liferay-portal-ee/blob/fix-pack-dxp-7-7210/portal-impl/src/com/liferay/portal/events/LoginPostAction.java#L125.

      Steps to reproduce:

      1. Set the property admin.sync.default.associations to true and startup the portal
      2. Add DEBUG logging for com.liferay.portal.search.internal.index.UpdateDocumentIndexWriterImpl
      3. Create a new user "testUser".
      4. Verify you see an entry in the logs which looks something like this:
      2021-06-11 20:14:01.902 DEBUG [http-nio-8080-exec-2][UpdateDocumentIndexWriterImpl:63] Document {... screenName=[testUser], ...}

      This means the user was created and reindexed

      5. Login as "testUser"

      6. Verify you see a similar entry to step 4

      7. Logout and repeat steps 5 and 6

      Expected results:

      Since the default groups/roles/user groups have not been modified, nor have the testUser's associations to said defaults, the testUser does not need any associations added, and therefore testUser does not need to be reindexed upon login.

      Actual Results:

      All users are reindexed upon login, even if they do not have any new associations.

      Reproduced on branch and master:

      7.2.x: ace4b728b99c4e32f93a70229cb93a9c5c4b4e74
      Master: e06bc300220060e82df1420079ab800fab71ce85

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brian.chan Brian Chan
              Reporter:
              christopher.kian Christopher Kian
              Participants of an Issue:
              Recent user:
              Enterprise Release HU
              Engineering Assignee:
              Christopher Kian
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 6 weeks, 1 day ago

                  Packages

                  Version Package
                  7.2.X
                  7.3.10.3 DXP SP3
                  7.3.X
                  7.4.2 CE GA3 DXP 7,4
                  7.4.13 DXP GA1
                  Master