Skip to content

WIP: Fix limit not applied to count query

Andreas Brandl requested to merge ab/fix-offset-pagination into master

What does this MR do?

Fix limit not applied to count query

For API pagination (projects endpoint), we changed to order of calls so that paginate(..) comes last. Unfortunately, BatchCountService#refresh_cache also iterates the list of projects which results in a query that doesn't have a limit applied at all.

#37919 (closed)

BatchCountService: https://gitlab.com/gitlab-org/gitlab/blob/ab/fix-offset-pagination/app/services/projects/batch_count_service.rb#L13

Edited by Andreas Brandl

Merge request reports