Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Using extended pagination with entities doesn't return all the entities when using default sort field #2982

Open
mooreds opened this issue Jan 27, 2025 · 0 comments

Comments

@mooreds
Copy link
Collaborator

mooreds commented Jan 27, 2025

What happened?

If you are trying to retrieve all entities and you have more than 10k, you have to use extended pagination. If you don't provide a sort field, then you can end up missing entities and not getting the entire amount, or getting duplicates.

This behavior does not show up on a fresh install of FusionAuth, but has been replicated on longer running instances.

See attached script (search.sh.txt, which you have to rename due to GH malware limitations) which you can run against a longer running instance and see the issue. It should return > 10k results but only returns 10k.

Workaround: add a sort field to the initial query, which will return all the entities. Note that this impacts the speed of results, but gives the correct number.

Additional context: This may impact user search; I did not test it.

Internal: https://inversoft.slack.com/archives/C0407G6V5/p1737997220265289

search.sh.txt

Version

1.55.1

Affects Versions

No response

@mooreds mooreds changed the title [Bug]: Using extended pagination with entities doesn't return all the entites when using default sort field [Bug]: Using extended pagination with entities doesn't return all the entities when using default sort field Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant