diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 212ed444e75be..618ff9024a7e3 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -539,6 +539,13 @@ static int remove_expired_obj( } obj = bucket->get_object(obj_key); + + RGWObjState* obj_state{nullptr}; + ret = obj->get_obj_state(dpp, &obj_state, null_yield, true); + if (ret < 0) { + return ret; + } + std::unique_ptr del_op = obj->get_delete_op(); del_op->params.versioning_status @@ -569,9 +576,9 @@ static int remove_expired_obj( "ERROR: publishing notification failed, with error: " << ret << dendl; } else { // send request to notification manager - (void) notify->publish_commit(dpp, obj->get_obj_size(), + (void) notify->publish_commit(dpp, obj_state->size, ceph::real_clock::now(), - obj->get_attrs()[RGW_ATTR_ETAG].to_str(), + obj_state->attrset[RGW_ATTR_ETAG].to_str(), version_id); }