Skip to content

Commit a926342

Browse files
authored
Merge pull request ceph#54372 from linuxbox2/wip-fix-deletemakers
rgwlc: fix delete marker regression in currentversion lc expiration
2 parents 3c227e9 + 6ae7888 commit a926342

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/rgw/rgw_lc.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,15 +522,19 @@ static int remove_expired_obj(
522522
auto& version_id = obj_key.instance;
523523
std::unique_ptr<rgw::sal::Notification> notify;
524524

525+
std::unique_ptr<rgw::sal::User> user;
526+
user = driver->get_user(bucket_info.owner);
527+
528+
/* per discussion w/Daniel, Casey,and Eric, we *do need*
529+
* a new sal object handle, based on the following decision
530+
* to clear obj_key.instance--which happens in the case
531+
* where a delete marker should be created */
525532
if (!remove_indeed) {
526533
obj_key.instance.clear();
527534
} else if (obj_key.instance.empty()) {
528535
obj_key.instance = "null";
529536
}
530-
531-
auto& obj = oc.obj;
532-
std::unique_ptr<rgw::sal::User> user;
533-
user = driver->get_user(bucket_info.owner);
537+
auto obj = oc.bucket->get_object(obj_key);
534538

535539
RGWObjState* obj_state{nullptr};
536540
ret = obj->get_obj_state(dpp, &obj_state, null_yield, true);

0 commit comments

Comments
 (0)