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: bucket resharding should not update bucket ACL or user stats #20038

Merged
merged 1 commit into from Feb 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 5 additions & 11 deletions src/rgw/rgw_reshard.cc
Expand Up @@ -345,7 +345,7 @@ class BucketInfoReshardUpdate

int RGWBucketReshard::do_reshard(
int num_shards,
const RGWBucketInfo& new_bucket_info,
RGWBucketInfo& new_bucket_info,
int max_entries,
bool verbose,
ostream *out,
Expand Down Expand Up @@ -469,16 +469,10 @@ int RGWBucketReshard::do_reshard(
return EIO;
}

RGWBucketAdminOpState bucket_op;

bucket_op.set_bucket_name(new_bucket_info.bucket.name);
bucket_op.set_bucket_id(new_bucket_info.bucket.bucket_id);
bucket_op.set_user_id(new_bucket_info.owner);
string err;
int r = RGWBucketAdminOp::link(store, bucket_op, &err);
if (r < 0) {
lderr(store->ctx()) << "failed to link new bucket instance (bucket_id=" << new_bucket_info.bucket.bucket_id << ": " << err << "; " << cpp_strerror(-r) << ")" << dendl;
return -r;
ret = rgw_link_bucket(store, new_bucket_info.owner, new_bucket_info.bucket, bucket_info.creation_time);
if (ret < 0) {
lderr(store->ctx()) << "failed to link new bucket instance (bucket_id=" << new_bucket_info.bucket.bucket_id << ": " << cpp_strerror(-ret) << ")" << dendl;
return -ret;
}

ret = bucket_info_updater.complete();
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_reshard.h
Expand Up @@ -31,7 +31,7 @@ class RGWBucketReshard {

int create_new_bucket_instance(int new_num_shards, RGWBucketInfo& new_bucket_info);
int do_reshard(int num_shards,
const RGWBucketInfo& new_bucket_info,
RGWBucketInfo& new_bucket_info,
int max_entries,
bool verbose,
ostream *os,
Expand Down