-
Notifications
You must be signed in to change notification settings - Fork 343
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
eg apps list and eg users list return incomplete results or empty #749
Comments
Hey @Tiberriver256, We do not return the whole set from the Admin API on purpose. In case of a huge list of users or applications, this would blow up the gateway. Given the Admin API and the gateway itself live in the same process, we do want to minimize it's impact as much as possible. That's why we leverage the Redis cursors to paginate through the result. Basically, for you, this means:
That should fulfill your use case. In case it's not or you need more clarification, feel free to reopen the issue or jump in our Gitter channel. Thanks! |
Ah, so maybe this is a bug in the cli consuming the API then? |
This might be. I'll reopen the issue! |
Ah, I think I found it. This should be checking for a nextKey then and calling again if there is one correct? express-gateway/admin/users.js Lines 35 to 42 in 76d32c1
|
Correct! |
@Tiberriver256 I proposed a solution for this problem in #762 pull request. If you have some time I'd appreciate your input there. Thanks! |
That works for me. Thank you sir. |
@XVincentX has this been reviewed? been so long |
The pull request has been reviewed some time ago. I addressed all the comments and pinging Kevin for another round of review — but no answer yet.
|
It seems that the SCAN in the findAll method for both the application dao and the user dao only does a single call instead of a full iteration which works when testing but not when your database grows outside of the default query range for SCAN.
The SCAN should be called again and again until the return cursor is 0 to guarantee the search is complete (called a 'full iteration'). From the docs:
I will put in a PR for what is working as a fix in our environment.
The text was updated successfully, but these errors were encountered: