return 0;
}
-extern int publish_abort(reservation_t& res) {
+int publish_abort(reservation_t& res) {
for (auto& topic : res.topics) {
if (!topic.cfg.dest.persistent ||
topic.res_id == cls_2pc_reservation::NO_ID) {
reservation_t::reservation_t(const DoutPrefixProvider* _dpp,
rgw::sal::RadosStore* _store,
- req_state* _s,
+ const req_state* _s,
rgw::sal::Object* _object,
rgw::sal::Object* _src_object,
const std::string* _object_name) :
rgw::sal::Object* _object,
rgw::sal::Object* _src_object,
rgw::sal::Bucket* _bucket,
- std::string& _user_id,
- std::string& _user_tenant,
- std::string& _req_id,
+ const std::string& _user_id,
+ const std::string& _user_tenant,
+ const std::string& _req_id,
optional_yield y) :
dpp(_dpp), store(_store), s(nullptr), size(0) /* XXX */,
object(_object), src_object(_src_object), bucket(_bucket),
cls_2pc_reservation::id_t _res_id) :
configurationId(_configurationId), cfg(_cfg), res_id(_res_id) {}
- std::string configurationId;
- rgw_pubsub_topic cfg;
+ const std::string configurationId;
+ const rgw_pubsub_topic cfg;
// res_id is reset after topic is committed/aborted
cls_2pc_reservation::id_t res_id;
};
- const DoutPrefixProvider* dpp;
+ const DoutPrefixProvider* const dpp;
std::vector<topic_t> topics;
rgw::sal::RadosStore* const store;
const req_state* const s;
rgw::sal::Object* const src_object; // may differ from object
rgw::sal::Bucket* const bucket;
const std::string* const object_name;
- boost::optional<RGWObjTags&> tagset;
+ boost::optional<const RGWObjTags&> tagset;
meta_map_t x_meta_map; // metadata cached by value
- std::string user_id;
- std::string user_tenant;
- std::string req_id;
+ const std::string user_id;
+ const std::string user_tenant;
+ const std::string req_id;
optional_yield yield;
/* ctor for rgw_op callers */
reservation_t(const DoutPrefixProvider* _dpp,
rgw::sal::RadosStore* _store,
- req_state* _s,
+ const req_state* _s,
rgw::sal::Object* _object,
rgw::sal::Object* _src_object,
const std::string* _object_name);
rgw::sal::Object* _object,
rgw::sal::Object* _src_object,
rgw::sal::Bucket* _bucket,
- std::string& _user_id,
- std::string& _user_tenant,
- std::string& _req_id,
+ const std::string& _user_id,
+ const std::string& _user_tenant,
+ const std::string& _req_id,
optional_yield y);
// dtor doing resource leak guarding
const DoutPrefixProvider *dpp);
// cancel the reservation
-int publish_abort(const DoutPrefixProvider *dpp, reservation_t& reservation);
+int publish_abort(reservation_t& reservation);
}