Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-23021

Groups are loaded repeatedly after a group change

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce:

      Difficult. We observed this on an XWiki instance with a big user group (5k users) where the members of this group are queried in three different places in the skin. When the group is updated, we saw slow traces in Glowroot that indicated that the GroupManager waited several times for the group to be loaded into the cache. It is possible that this can only be observed under high load.

      Expected result:

      The group is only loaded once into the cache, and all threads requesting groups wait for that load.

      Actual result:

      The group is loaded by several, different threads. This is because there is a race condition in the groups cache, it checks first if the group is in the cache under a read lock, and then acquires a write lock to add the group to the cache. However, under the write lock, it doesn't check again if the group is already in the cache.

      Attachments

        Activity

          People

            MichaelHamann Michael Hamann
            MichaelHamann Michael Hamann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: