]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix race b/w bucket reshard and ops waiting on reshard completion 27223/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Wed, 27 Mar 2019 20:33:38 +0000 (16:33 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Thu, 28 Mar 2019 00:42:39 +0000 (20:42 -0400)
commit26b793680805721cac86f64cdd234b273bf33be4
tree3333ec83c249c4141961f9863d2ab2d845c395e8
parentd0894e6f6c062907796d10b524088c2abf7e4252
rgw: fix race b/w bucket reshard and ops waiting on reshard completion

A previous commit (f84f70d4) added functionality to clean up old
bucket instances and bucket shards once sharding completed
successfully. However the existing code that allowed a bucket
operation to wait until resharding completed was relying on a field in
the old bucket instance to know the bucket instance id of the new
bucket instance. This created a race condition as to whether the
clean-up or read of the bucket instance id would occur first.

This solution rereads the bucket entry point object when resharding
completes to determine the bucket instance id of the new bucket
thereby avoiding the race.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/rgw/rgw_rados.cc