diff options
author | Casey Bodley <cbodley@redhat.com> | 2024-09-04 22:02:44 +0200 |
---|---|---|
committer | Casey Bodley <cbodley@redhat.com> | 2024-09-04 22:02:46 +0200 |
commit | 461be1cd3d504af07dbd059e1a32255843ea572f (patch) | |
tree | 2bd44a46a4f03d741df75731784239debb56780c /src/rgw/driver/rados/rgw_rados.cc | |
parent | Merge pull request #59490 from Suyashd999/fix-mfr1 (diff) | |
download | ceph-461be1cd3d504af07dbd059e1a32255843ea572f.tar.xz ceph-461be1cd3d504af07dbd059e1a32255843ea572f.zip |
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 <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/driver/rados/rgw_rados.cc')
-rw-r--r-- | src/rgw/driver/rados/rgw_rados.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rgw/driver/rados/rgw_rados.cc b/src/rgw/driver/rados/rgw_rados.cc index 23c149574ae..b36220d4f11 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); |