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

RepositoryService.findByOrigin doesn't order the returned forks

    XMLWordPrintable

Details

    Description

      The database query performed by RepositoryService.findByOrigin(Repository, PageRequest) does not apply an order by clause. This means forks are returned in arbitrary order, which makes paging for this call unreliable. Since there's no explicit order, there's no guarantee forks on the second and subsequent pages didn't appear on a previous page, or that any given fork will ever appear on any page if the number of forks exceeds the page limit.

      This has a knock-on effect in that it makes fork syncing, which uses it, unreliable. If a given repository has more than 25 forks, syncing may not be performed for some of them.

      Attachments

        Activity

          People

            bturner Bryan Turner (Inactive)
            bturner Bryan Turner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: