summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_lc.cc
diff options
context:
space:
mode:
authorDaniel Gryniewicz <dang@redhat.com>2022-05-04 20:07:30 +0200
committerDaniel Gryniewicz <dang@redhat.com>2023-03-01 16:55:50 +0100
commitca350b13d370e0f0960b739603a2eb6581f96ad1 (patch)
tree71f49d2eab2847d411443c9bc51a5ec64bedc812 /src/rgw/rgw_lc.cc
parentMerge pull request #50256 from yuvalif/wip-yuval-zipper-notifications (diff)
downloadceph-ca350b13d370e0f0960b739603a2eb6581f96ad1.tar.xz
ceph-ca350b13d370e0f0960b739603a2eb6581f96ad1.zip
RGW - Replace set_owner workaround with new fix
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
Diffstat (limited to 'src/rgw/rgw_lc.cc')
-rw-r--r--src/rgw/rgw_lc.cc15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc
index 1baa0164dd8..212ed444e75 100644
--- a/src/rgw/rgw_lc.cc
+++ b/src/rgw/rgw_lc.cc
@@ -528,25 +528,16 @@ static int remove_expired_obj(
obj_key.instance = "null";
}
+ std::unique_ptr<rgw::sal::User> user;
std::unique_ptr<rgw::sal::Bucket> bucket;
std::unique_ptr<rgw::sal::Object> obj;
- ret = driver->get_bucket(nullptr, bucket_info, &bucket);
+ user = driver->get_user(bucket_info.owner);
+ ret = driver->get_bucket(user.get(), bucket_info, &bucket);
if (ret < 0) {
return ret;
}
- // XXXX currently, rgw::sal::Bucket.owner is always null here
- std::unique_ptr<rgw::sal::User> user;
- if (! bucket->get_owner()) {
- auto& bucket_info = bucket->get_info();
- user = driver->get_user(bucket_info.owner);
- // forgive me, lord
- if (user) {
- bucket->set_owner(user.get());
- }
- }
-
obj = bucket->get_object(obj_key);
std::unique_ptr<rgw::sal::Object::DeleteOp> del_op
= obj->get_delete_op();