@@ -370,7 +370,7 @@ int RadosBucket::remove(const DoutPrefixProvider* dpp,
370370 if (get_attrs ().count (RGW_ATTR_LC)) {
371371 constexpr bool merge_attrs = false ; // don't update xattrs, we're deleting
372372 (void ) store->getRados ()->get_lc ()->remove_bucket_config (
373- this , get_attrs (), merge_attrs);
373+ dpp, y, this , get_attrs (), merge_attrs);
374374 }
375375
376376 // remove bucket-topic mapping
@@ -3604,24 +3604,21 @@ int LCRadosSerializer::try_lock(const DoutPrefixProvider *dpp, utime_t dur, opti
36043604 return lock.lock_exclusive (ioctx, oid);
36053605}
36063606
3607- int RadosLifecycle::get_entry (const std::string& oid, const std::string& marker,
3607+ int RadosLifecycle::get_entry (const DoutPrefixProvider* dpp, optional_yield y,
3608+ const std::string& oid, const std::string& marker,
36083609 std::unique_ptr<LCEntry>* entry)
36093610{
36103611 cls_rgw_lc_entry cls_entry;
36113612 int ret = cls_rgw_lc_get_entry (*store->getRados ()->get_lc_pool_ctx (), oid, marker, cls_entry);
36123613 if (ret)
36133614 return ret;
36143615
3615- LCEntry* e;
3616- e = new StoreLCEntry (cls_entry.bucket , cls_entry.start_time , cls_entry.status );
3617- if (!e)
3618- return -ENOMEM;
3619-
3620- entry->reset (e);
3616+ *entry = std::make_unique<StoreLCEntry>(cls_entry.bucket , cls_entry.start_time , cls_entry.status );
36213617 return 0 ;
36223618}
36233619
3624- int RadosLifecycle::get_next_entry (const std::string& oid, const std::string& marker,
3620+ int RadosLifecycle::get_next_entry (const DoutPrefixProvider* dpp, optional_yield y,
3621+ const std::string& oid, const std::string& marker,
36253622 std::unique_ptr<LCEntry>* entry)
36263623{
36273624 cls_rgw_lc_entry cls_entry;
@@ -3631,16 +3628,12 @@ int RadosLifecycle::get_next_entry(const std::string& oid, const std::string& ma
36313628 if (ret)
36323629 return ret;
36333630
3634- LCEntry* e;
3635- e = new StoreLCEntry (cls_entry.bucket , cls_entry.start_time , cls_entry.status );
3636- if (!e)
3637- return -ENOMEM;
3638-
3639- entry->reset (e);
3631+ *entry = std::make_unique<StoreLCEntry>(cls_entry.bucket , cls_entry.start_time , cls_entry.status );
36403632 return 0 ;
36413633}
36423634
3643- int RadosLifecycle::set_entry (const std::string& oid, LCEntry& entry)
3635+ int RadosLifecycle::set_entry (const DoutPrefixProvider* dpp, optional_yield y,
3636+ const std::string& oid, LCEntry& entry)
36443637{
36453638 cls_rgw_lc_entry cls_entry;
36463639
@@ -3651,8 +3644,9 @@ int RadosLifecycle::set_entry(const std::string& oid, LCEntry& entry)
36513644 return cls_rgw_lc_set_entry (*store->getRados ()->get_lc_pool_ctx (), oid, cls_entry);
36523645}
36533646
3654- int RadosLifecycle::list_entries (const std::string& oid, const std::string& marker,
3655- uint32_t max_entries, std::vector<std::unique_ptr<LCEntry>>& entries)
3647+ int RadosLifecycle::list_entries (const DoutPrefixProvider* dpp, optional_yield y,
3648+ const std::string& oid, const std::string& marker,
3649+ uint32_t max_entries, std::vector<std::unique_ptr<LCEntry>>& entries)
36563650{
36573651 entries.clear ();
36583652
@@ -3670,7 +3664,8 @@ int RadosLifecycle::list_entries(const std::string& oid, const std::string& mark
36703664 return ret;
36713665}
36723666
3673- int RadosLifecycle::rm_entry (const std::string& oid, LCEntry& entry)
3667+ int RadosLifecycle::rm_entry (const DoutPrefixProvider* dpp, optional_yield y,
3668+ const std::string& oid, LCEntry& entry)
36743669{
36753670 cls_rgw_lc_entry cls_entry;
36763671
@@ -3681,23 +3676,20 @@ int RadosLifecycle::rm_entry(const std::string& oid, LCEntry& entry)
36813676 return cls_rgw_lc_rm_entry (*store->getRados ()->get_lc_pool_ctx (), oid, cls_entry);
36823677}
36833678
3684- int RadosLifecycle::get_head (const std::string& oid, std::unique_ptr<LCHead>* head)
3679+ int RadosLifecycle::get_head (const DoutPrefixProvider* dpp, optional_yield y,
3680+ const std::string& oid, std::unique_ptr<LCHead>* head)
36853681{
36863682 cls_rgw_lc_obj_head cls_head;
36873683 int ret = cls_rgw_lc_get_head (*store->getRados ()->get_lc_pool_ctx (), oid, cls_head);
36883684 if (ret)
36893685 return ret;
36903686
3691- LCHead* h;
3692- h = new StoreLCHead (cls_head.start_date , cls_head.shard_rollover_date , cls_head.marker );
3693- if (!h)
3694- return -ENOMEM;
3695-
3696- head->reset (h);
3687+ *head = std::make_unique<StoreLCHead>(cls_head.start_date , cls_head.shard_rollover_date , cls_head.marker );
36973688 return 0 ;
36983689}
36993690
3700- int RadosLifecycle::put_head (const std::string& oid, LCHead& head)
3691+ int RadosLifecycle::put_head (const DoutPrefixProvider* dpp, optional_yield y,
3692+ const std::string& oid, LCHead& head)
37013693{
37023694 cls_rgw_lc_obj_head cls_head;
37033695
0 commit comments