Uploaded image for project: 'Confluence Server'
  1. Confluence Server
  2. CONFSERVER-13754

HibernateGroupManager.hasExternalMembership() is slow for group with thousands of users

    XMLWordPrintable

    Details

    • Support reference count:
      9
    • Internal Complexity:
      3
    • Internal Value:
      6

      Description

      The ConfluenceGroupJoiningAuthenticator calls getGroupManager().hasMembership which in turn calls hasExternalMembership(). This causes loading of users of that group, which can be extremely slow if the group has thousands of users.

      If you're writing a custom authenticator, the workaround here is to use something like this instead:

       boolean permission = permissionManager.hasPermission(getUserAccessor().getUser(username),Permission.VIEW, PermissionManager.TARGET_APPLICATION);
      

      Check the source attached here.

        Attachments

        1. bug.gif
          bug.gif
          0.3 kB
        2. bug.gif
          bug.gif
          0.3 kB
        3. bug.gif
          bug.gif
          0.3 kB
        4. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        5. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        6. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        7. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        8. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        9. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        10. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        11. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        12. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        13. ConfluenceGroupJoiningAuthenticator.class
          3 kB
        14. ConfluenceGroupJoiningAuthenticator.java
          4 kB
        15. linkext7.gif
          linkext7.gif
          0.2 kB
        16. linkext7.gif
          linkext7.gif
          0.2 kB
        17. linkext7.gif
          linkext7.gif
          0.2 kB
        18. linkext7.gif
          linkext7.gif
          0.2 kB
        19. linkext7.gif
          linkext7.gif
          0.2 kB
        20. linkext7.gif
          linkext7.gif
          0.2 kB
        21. priority_critical.gif
          priority_critical.gif
          0.2 kB
        22. priority_major.gif
          priority_major.gif
          0.1 kB
        23. priority_major.gif
          priority_major.gif
          0.1 kB
        24. spacer.gif
          spacer.gif
          0.0 kB
        25. spacer.gif
          spacer.gif
          0.0 kB
        26. spacer.gif
          spacer.gif
          0.0 kB
        27. status_open.gif
          status_open.gif
          0.3 kB
        28. status_open.gif
          status_open.gif
          0.3 kB
        29. status_open.gif
          status_open.gif
          0.3 kB

          Issue Links

            Activity

              People

              • Assignee:
                dave@atlassian.com Dave Loeng
                Reporter:
                jlargman Jeremy Largman
                Participants:
                Last Touched By:
                Owen Sanico
                Reviewers:
                Anatoli Kazatchkov
              • Votes:
                4 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  9 years, 4 weeks, 4 days ago