]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: radosgw-admin should paginate internally when listing bucket 37803/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 1 Oct 2020 17:33:01 +0000 (13:33 -0400)
committerNathan Cutler <ncutler@suse.com>
Mon, 26 Oct 2020 19:23:31 +0000 (20:23 +0100)
commit7c252ae0efd50b419e89856ea3a1b95be6dae493
tree84f8d6966e9dfc1899e586235d54607dc1b4bde2
parentb6d6e254979727c5d5ae5386f42bf220a508269a
rgw: radosgw-admin should paginate internally when listing bucket

Currently `radosgw-admin bucket list ...`, when listing a bucket, asks
for the value of "--max-entries" internally. To list a large bucket
entirely the user would have to set "--max-entries" to a large value
(e.g., 10000000). Internally this doesn't paginate, so it will try to
produce the entire list at once. This can consume a lot of memory, and
there are known cases where this induces an out-of-memory crash.

So now we'll set a maximum pagination size of 10,000. So even with
large values of "--max-entries" it will still be able to produce the
full listing without stressing memory, because it will ask for at most
10,000 entries at a time.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 6d033061bf9eaebf3dab37b9ed45de22ce6fa6b7)

Conflicts:
src/rgw/rgw_admin.cc
- formatter does not have get() method in octopus
src/rgw/rgw_admin.cc