From: Casey Bodley Date: Wed, 4 Sep 2024 20:02:44 +0000 (-0400) Subject: rgw/rados: guard against dir suggest during reshard X-Git-Tag: v20.0.0~960^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=461be1cd3d504af07dbd059e1a32255843ea572f;p=ceph.git rgw/rados: guard against dir suggest during reshard no changes to the bucket index should be allowed while resharding. these rados ops are fire-and-forget, so we want to fail them until reshard completes. the next listing after that should resend the suggestions Signed-off-by: Casey Bodley --- diff --git a/src/rgw/driver/rados/rgw_rados.cc b/src/rgw/driver/rados/rgw_rados.cc index 23c149574ae9..b36220d4f118 100644 --- a/src/rgw/driver/rados/rgw_rados.cc +++ b/src/rgw/driver/rados/rgw_rados.cc @@ -9756,6 +9756,8 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp, for (auto& miter : updates) { if (miter.second.length()) { ObjectWriteOperation o; + o.assert_exists(); + cls_rgw_guard_bucket_resharding(o, -ERR_BUSY_RESHARDING); cls_rgw_suggest_changes(o, miter.second); // we don't care if we lose suggested updates, send them off blindly AioCompletion *c = @@ -9991,6 +9993,8 @@ check_updates: for (; miter != updates.end(); ++miter) { if (miter->second.length()) { ObjectWriteOperation o; + o.assert_exists(); + cls_rgw_guard_bucket_resharding(o, -ERR_BUSY_RESHARDING); cls_rgw_suggest_changes(o, miter->second); // we don't care if we lose suggested updates, send them off blindly AioCompletion *c = librados::Rados::aio_create_completion(nullptr, nullptr);