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

Paginator MaxPerPage default value is too small since paginator was introduced in 2.3.0 #1356

Closed
r0ro opened this issue Jun 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@r0ro
Copy link
Contributor

r0ro commented Jun 1, 2023

Hi,

We have a use case where we need to synchronize listmonk db with our main db.
For this we were retrieving batches of 100 000 subscribers calling /api/subscribers with per_page=100000.

Since the introduction of paginator lib with 56a9836, the default setting is MaxPerPage: 50.

What could be improved

  • default setting silently restrict the number of entries returned to MaxPerPage meaning that it is not easy to detect the behaviour change
  • maybe paginator could return an error when per_page exceed MaxPerPage setting
  • when configured with AllowAll: true I don't see a rationale to enforce restriction on number of entries per page, but it might still be useful to iterate by batch.

Describe the solution you'd like
either:

  • remove the MaxPerPage restriction when AllowAll: true
  • remove MaxPerPage in ListMonk paginator config
  • increase MaxPerPage to a higher value
@r0ro r0ro added the enhancement New feature or request label Jun 1, 2023
@knadh knadh closed this as completed in e0cda4b Jun 3, 2023
@knadh
Copy link
Owner

knadh commented Jun 3, 2023

Thanks for reporting this @r0ro. You're right that if Allowall=true, then MaxPerPage shouldn't apply. This is merged in the paginator lib and here as well.

@r0ro
Copy link
Contributor Author

r0ro commented Jun 5, 2023

Thanks @knadh for this quick response and for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants