Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-1944

Optimize DelegateSentryStore.getGroupsByRoles() and update SentryGenericPolicyProcessor to retrieve roles to group mapping in a single transaction

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: Sentry
    • Labels:
      None

      Description

      When Solr is using Sentry server for authorization, it issues a lot of calls to getGroupsByRoles() function in DelegateSentryStore.

      This function isn't very efficient - it walks over each role in the set, obtains role by name, get groups for each role, and collects all group names into a set.

      It may be possible to optimize it.

      Also, in SentryGenericPolicyProcessor class method list_sentry_roles_by_group() would make N transactions to build the roles to set of groups map. Instead, make it to a single transaction. This will significantly speed up operation

        Attachments

        1. SENTRY-1944.09.patch
          17 kB
          Arjun Mishra
        2. SENTRY-1944.08.patch
          15 kB
          Arjun Mishra
        3. SENTRY-1944.07.patch
          14 kB
          Arjun Mishra
        4. SENTRY-1944.06.patch
          14 kB
          Arjun Mishra
        5. SENTRY-1944.05.patch
          14 kB
          Arjun Mishra
        6. SENTRY-1944.03.patch
          6 kB
          Arjun Mishra
        7. SENTRY-1944.02.patch
          3 kB
          Arjun Mishra
        8. SENTRY-1944.01.patch
          6 kB
          Arjun Mishra

          Issue Links

            Activity

              People

              • Assignee:
                arjunmishra13 Arjun Mishra
                Reporter:
                akolb Alexander Kolbasov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: