]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: `radosgw-admin bucket rm ... --purge-objects` can hang...
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 31 Jan 2019 19:21:07 +0000 (14:21 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Thu, 31 Jan 2019 22:43:25 +0000 (17:43 -0500)
commit5b3dc38c628728651b26415ab3d2190cf06b9e39
tree351b5340d315f6661c8a0284b82048601e1bcd64
parent359e091c80d5237bb79eebb6f300f56a442d6f37
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>
src/rgw/rgw_bucket.cc