Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mimic: rgw: fix race b/w bucket reshard and ops waiting on reshard completion #29139

Merged
merged 3 commits into from Jul 24, 2019

Conversation

@ivancich
Copy link
Member

ivancich commented Jul 19, 2019

https://tracker.ceph.com/issues/39203


A previous commit (f84f70d) 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.

Tracker: https://tracker.ceph.com/issues/39203

ivancich added 3 commits Mar 12, 2019
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 1c2aa90)
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit d0894e6)
A previous commit (f84f70d) 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>
(cherry picked from commit 26b7936)

Conflicts:
        src/rgw/rgw_rados.cc: equivalent changes made to rgw_reshard.cc
@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Jul 23, 2019

@yuriw yuriw merged commit 9a47a4a into ceph:mimic Jul 24, 2019
4 checks passed
4 checks passed
Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.