Change in BSERV-20271 causes performance regression

XMLWordPrintable

    • Severity 3 - Minor
    • RtB - Service ops & Tech entropy

      Issue Summary

      The changes made in BSERV-20271 causes performance regression in pull request participant search.
      The versions impacted are limited to: 8.19.26, 9.4.14, 9.4.15, 10.1.2, 10.1.3

      Steps to Reproduce

      1. Navigate the the pull request list page on a repository with lots of pull requests (closed or open it doesn't matter)
      2. Type into the user selector a string for a username that doesn't exist; a long random string works

      Expected Results

      The request submitted to Bitbucket should complete in ~1s

      Actual Results

      The request takes many seconds. The profiling logs can also be inspected for slow calls to the participants endpoint:

      2026-01-08 05:39:08,581 | http-nio-7990-exec-43 | *1P4JHU3x338x2172068x6 | someuser | 9otk65
      [24979.8ms] - "GET /rest/api/latest/projects/EXAMPLE/repos/example/participants HTTP/1.1"
       [1.7ms] - ApplicationUser com.atlassian.bitbucket.user.UserService.getUserById(int)
       [24836.0ms] - Page com.atlassian.bitbucket.pull.PullRequestService.searchUsers(PullRequestParticipantSearchRequest,PageRequest)
        [24834.5ms] [count: 3, avg: 8278.2ms] - Page com.atlassian.stash.internal.pull.PullRequestParticipantDao.searchUsers(PullRequestParticipantSearchCriteria,PageRequest)
       [135.1ms] - AvatarEnricher.enrich
        [20.2ms] [count: 18, avg: 1.1ms] - void com.atlassian.stash.internal.avatar.AvatarUrlDecorator.decorate(Builder,ApplicationUser)
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Ben Humphreys
              Reporter:
              Ben Humphreys
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: