Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2.4.0
-
None
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.