On Fri, Jun 16, 2017 at 10:50:57PM +0200, Michael Rasmussen wrote:
> On Fri, 16 Jun 2017 14:21:34 +0200
> Fabian Grünbichler <f.gruenbich...@proxmox.com> wrote:
> > > my $limit = 10000; # limit for get requests  
> > 
> > this seems kind of arbitrary? if you really need such limit, you also
> > need to implement pagination or something like it, otherwise you are in
> > trouble.
> > 
> The reason for this is that the API has a default limit which is
> configured to 20 and there is no way of knowing the number of rows in
> the full dataset. Setting the number to this high level should prevent
> having to loop. This was only chosen for the beta so the next patch
> will have a loop requesting a batch at the time until an empty
> resultset is returned.

I was afraid of something like this.. the whole API does not seem very
though through unfortunately. let's see whether the paging is doable,
and otherwise document this potential pitfall (e.g., having more than
10000 snapshots on a busy big storage node does not seem extremely far

pve-devel mailing list

Reply via email to