[pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation

Michael Rasmussen mir at datanom.net
Fri Jun 16 22:50:57 CEST 2017


On Fri, 16 Jun 2017 14:21:34 +0200
Fabian Grünbichler <f.gruenbichler at 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.

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
/usr/games/fortune -es says:
Don't comment bad code - rewrite it.
            - The Elements of Programming Style (Kernighan & Plaugher)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20170616/65782fc4/attachment.sig>


More information about the pve-devel mailing list