-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Description
Description
When querying Maven packages from the Gitea using the endpoint {base_url}/packages/{owner}?page={page}&limit={PAGE_SIZE}&type=maven, duplicate entries appear across different pages, especially when the total number of packages is very large (like 20,000). Sometimes, if you request the same page again, the duplicate packages won't appear, showing that the way pages are filled with packages can be unpredictable. Additionally, if you make the same request multiple times, you might get different packages each time.
Gitea Version: a36636357
Deployment: The Gitea instance is running within a Kubernetes pod managed by Rancher.
Database Used: PostgreSQL 12.17-bullseye
Additional Context: This issue might be related to how pagination is implemented in the backend storage or indexing system used by Gitea for package management.
Steps to Reproduce
- Send a GET request to
{base_url}/packages/{owner}?page=1&limit=20&type=mavenwith a high total package count ( in our case more then 20000) - Note the packages returned and repeat the request for the same page.
- Compare the results from both requests and note any duplicates.
- Optionally, continue to the next page and check for overlap with previous pages.
Expected Behavior
Each page requested should return a unique set of packages without overlap, regardless of the number of times the same page is queried.
Actual Behavior
Some package entries are duplicated across multiple page results, and the same page request can yield different packages on subsequent queries.
Gitea Version
a36636357
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Linux
How are you running Gitea?
The Gitea instance is running within a Kubernetes pod managed by Rancher.
Database
PostgreSQL