Skip to content

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

@r0ro

Description

@r0ro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions