]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: `radosgw-admin bucket rm ... --purge-objects` can hang... 26266/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 31 Jan 2019 19:21:07 +0000 (14:21 -0500)
committerPrashant D <pdhange@redhat.com>
Mon, 4 Feb 2019 03:35:11 +0000 (22:35 -0500)
commit285e53b8d199f0a38d4c3b14feb405842e7fa292
tree15fe775fd12e534de34653c4e65d17b51fe46ec9
parentf8a1610bed59c0c9383fa83daa8fc6c1b9754531
rgw: `radosgw-admin bucket rm ... --purge-objects` can hang...

This command can hang (i.e., enter an infinite loop) due to
problematic bucket index entries left as a result of bug
https://tracker.ceph.com/issues/38007 .

The fix is to ignore the false bucket index entries -- since they do
not represent actual objects -- and remove all actual objects in the
bucket, so that bucket itself can be removed.

This fixes the both code paths whether `--bypass-gc` is specified or
not.

Furthermore, to made these operations more efficient, the internal
listing of the bucket is done unordered. This would improve behavior
when removing buckets with a large number of objects.

Fixes: http://tracker.ceph.com/issues/38134
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 5b3dc38c628728651b26415ab3d2190cf06b9e39)
src/rgw/rgw_bucket.cc