Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-13303

Sending a request with a permissions filter on Bitbucket with many users takes a lot of time.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 6.7.0
    • API - REST

    Description

      Issue Summary

      Sending a request with a permissions filter on Bitbucket with many users takes a lot of time.

      When using the `users` API accordingly with the documentation

      When the request includes a permissions filter, it takes ≈10 sec for 27k users.
      1 /rest/api/latest/users?permission.1=REPO_READ&permission.1.repositoryId=5736&start=0&limit=20&avatarSize=32
      When the request is sent without a permissions filter, it takes ≈100 ms for the same 27k users.
      1 /rest/api/latest/users?start=0&limit=20&avatarSize=32

      Steps to Reproduce

      When the request includes a permissions filter, it takes ≈10 sec for 27k users.
      1 /rest/api/latest/users?permission.1=REPO_READ&permission.1.repositoryId=5736&start=0&limit=20&avatarSize=32
      When the request is sent without a permissions filter, it takes ≈100 ms for the same 27k users.
      1 /rest/api/latest/users?start=0&limit=20&avatarSize=32
       

      Expected Results

      Sending a request with a permissions filter on Bitbucket with many users will be faster than 1 sec.

      Actual Results

      Sending a request with a permissions filter on Bitbucket with many users takes a lot of time.

      Workaround

      Using repository scoped permissions endpoint that accepts a user filter, it doesn't take nearly as long.

      However, there's no filtering by permission for that currently since that only returns the highest permission for users to a repo.

      Attachments

        Activity

          People

            Unassigned Unassigned
            9589802e4b9d tgabriel2 (Inactive)
            Votes:
            11 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: