Skip to content

Commit

Permalink
Merge pull request ceph#59609 from cbodley/wip-rgw-dir-suggest-reshard
Browse files Browse the repository at this point in the history
rgw/rados: guard against dir suggest during reshard

Reviewed-by: Matt Benjamin <[email protected]>
  • Loading branch information
cbodley authored Sep 26, 2024
2 parents 9e1a2c0 + 461be1c commit f6f2b88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rgw/driver/rados/rgw_rados.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9843,6 +9843,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 =
Expand Down Expand Up @@ -10078,6 +10080,8 @@ int RGWRados::cls_bucket_list_unordered(const DoutPrefixProvider *dpp,
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);
Expand Down

0 comments on commit f6f2b88

Please sign in to comment.