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

rgw: fix for bucket delete racing with mdlog sync #11648

Merged
merged 1 commit into from Nov 7, 2016

Conversation

cbodley
Copy link
Contributor

@cbodley cbodley commented Oct 25, 2016

proposed fix for bucket deletion on a remote racing with mdlog sync

Fixes: http://tracker.ceph.com/issues/17698

@@ -2481,6 +2481,12 @@ void RGWDeleteBucket::execute()
}

op_ret = store->delete_bucket(s->bucket, ot);

if (op_ret == -ECANCELED && !store->is_meta_master()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbodley can't this happen with multiple deletes going to the same bucket on the master zone also?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably, yeah. should we map ECANCELED to ENOENT in that case, or return success there as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently the ECANCELED is returned by cls_version, which actually reraises a ENOENT from version check as a ECANCELED as the version check fails through, should we be just raising the ENOENT as it is, if there is no one else consuming the cls_version check that is...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yehudasa @cbodley was able to reproduce the multiple deletes going to master zone and master raising a -125; but no debug logs; so yes we should handle this case too

Fixes: http://tracker.ceph.com/issues/17698

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley
Copy link
Contributor Author

cbodley commented Oct 25, 2016

updated to handle races on the metadata master as well. also added a return, because we've already called rgw_unlink_bucket() in either case

@theanalyst
Copy link
Member

the latest change worked for both the cases, ie. races in master zone & slave zone for bucket removal

@yehudasa yehudasa self-assigned this Oct 27, 2016
@yehudasa yehudasa merged commit 82740e9 into ceph:master Nov 7, 2016
@cbodley cbodley deleted the wip-17698 branch November 7, 2016 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants