diff options
Diffstat (limited to 'src/rgw/rgw_lc.cc')
-rw-r--r-- | src/rgw/rgw_lc.cc | 225 |
1 files changed, 123 insertions, 102 deletions
diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 0d510d6642d..c9fb4765d59 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -258,13 +258,13 @@ void RGWLC::finalize() delete[] obj_names; } -static inline std::ostream& operator<<(std::ostream &os, rgw::sal::Lifecycle::LCEntry& ent) { +static inline std::ostream& operator<<(std::ostream &os, rgw::sal::LCEntry& ent) { os << "<ent: bucket="; - os << ent.get_bucket(); + os << ent.bucket; os << "; start_time="; - os << rgw_to_asctime(utime_t(time_t(ent.get_start_time()), 0)); + os << rgw_to_asctime(utime_t(ent.start_time, 0)); os << "; status="; - os << LC_STATUS[ent.get_status()]; + os << LC_STATUS[ent.status]; os << ">"; return os; } @@ -495,6 +495,14 @@ struct lc_op_ctx { octx(env.driver), dpp(dpp), wq(wq) { obj = bucket->get_object(o.key); + /* once bucket versioning is enabled, the non-current entries with + * instance empty should have instance set to "null" to be able + * to correctly read its olh version entry. + */ + if (o.key.instance.empty() && bucket->versioned() && !o.is_current()) { + rgw_obj_key& obj_key = obj->get_key(); + obj_key.instance = "null"; + } } bool next_has_same_name(const std::string& key_name) { @@ -1175,7 +1183,7 @@ public: << " " << oc.wq->thr_name() << dendl; } else { /* ! o.is_delete_marker() */ - r = remove_expired_obj(oc.dpp, oc, !oc.bucket->versioned(), + r = remove_expired_obj(oc.dpp, oc, !oc.bucket->versioning_enabled(), {rgw::notify::ObjectExpirationCurrent, rgw::notify::LifecycleExpirationDelete}); if (r < 0) { @@ -1355,9 +1363,9 @@ public: int delete_tier_obj(lc_op_ctx& oc) { int ret = 0; - /* If bucket is versioned, create delete_marker for current version + /* If bucket has versioning enabled, create delete_marker for current version */ - if (! oc.bucket->versioned()) { + if (! oc.bucket->versioning_enabled()) { ret = remove_expired_obj(oc.dpp, oc, true, {rgw::notify::ObjectTransition}); ldpp_dout(oc.dpp, 20) << "delete_tier_obj Object(key:" << oc.o.key @@ -1387,9 +1395,10 @@ public: int transition_obj_to_cloud(lc_op_ctx& oc) { int ret{0}; - /* If CurrentVersion object, remove it & create delete marker */ + /* If CurrentVersion object & bucket has versioning enabled, remove it & + * create delete marker */ bool delete_object = (!oc.tier->retain_head_object() || - (oc.o.is_current() && oc.bucket->versioned())); + (oc.o.is_current() && oc.bucket->versioning_enabled())); /* notifications */ auto& bucket = oc.bucket; @@ -1834,7 +1843,7 @@ public: }; int RGWLC::bucket_lc_post(int index, int max_lock_sec, - rgw::sal::Lifecycle::LCEntry& entry, int& result, + rgw::sal::LCEntry& entry, int& result, LCWorker* worker) { utime_t lock_duration(cct->_conf->rgw_lc_lock_max_time, 0); @@ -1865,19 +1874,19 @@ int RGWLC::bucket_lc_post(int index, int max_lock_sec, /* XXXX are we SURE the only way result could == ENOENT is when * there is no such bucket? It is currently the value returned * from bucket_lc_process(...) */ - ret = sal_lc->rm_entry(obj_names[index], entry); + ret = sal_lc->rm_entry(this, null_yield, obj_names[index], entry); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::bucket_lc_post() failed to remove entry " << obj_names[index] << dendl; } goto clean; } else if (result < 0) { - entry.set_status(lc_failed); + entry.status = lc_failed; } else { - entry.set_status(lc_complete); + entry.status = lc_complete; } - ret = sal_lc->set_entry(obj_names[index], entry); + ret = sal_lc->set_entry(this, null_yield, obj_names[index], entry); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::bucket_lc_post() failed to set entry on " << obj_names[index] << dendl; @@ -1891,13 +1900,14 @@ clean: } /* RGWLC::bucket_lc_post */ int RGWLC::list_lc_progress(string& marker, uint32_t max_entries, - vector<std::unique_ptr<rgw::sal::Lifecycle::LCEntry>>& progress_map, + vector<rgw::sal::LCEntry>& progress_map, int& index) { progress_map.clear(); for(; index < max_objs; index++, marker="") { - vector<std::unique_ptr<rgw::sal::Lifecycle::LCEntry>> entries; - int ret = sal_lc->list_entries(obj_names[index], marker, max_entries, entries); + vector<rgw::sal::LCEntry> entries; + int ret = sal_lc->list_entries(this, null_yield, obj_names[index], + marker, max_entries, entries); if (ret < 0) { if (ret == -ENOENT) { ldpp_dout(this, 10) << __func__ << "() ignoring unfound lc object=" @@ -1913,7 +1923,7 @@ int RGWLC::list_lc_progress(string& marker, uint32_t max_entries, /* update index, marker tuple */ if (progress_map.size() > 0) - marker = progress_map.back()->get_bucket(); + marker = progress_map.back().bucket; if (progress_map.size() >= max_entries) break; @@ -1990,6 +2000,12 @@ int RGWLC::process(LCWorker* worker, } } + ret = static_cast<rgw::sal::RadosStore*>(driver)->getRados()->process_expire_objects(this, null_yield); + if (ret < 0) { + ldpp_dout(this, 5) << "RGWLC::process_expire_objects: failed, " + << " worker ix: " << worker->ix << dendl; + } + return 0; } @@ -2033,7 +2049,6 @@ int RGWLC::process_bucket(int index, int max_lock_secs, LCWorker* worker, std::unique_ptr<rgw::sal::LCSerializer> serializer = sal_lc->get_serializer(lc_index_lock_name, obj_names[index], worker->thr_name()); - std::unique_ptr<rgw::sal::Lifecycle::LCEntry> entry; if (max_lock_secs <= 0) { return -EAGAIN; } @@ -2052,10 +2067,12 @@ int RGWLC::process_bucket(int index, int max_lock_secs, LCWorker* worker, std::unique_lock<rgw::sal::LCSerializer> lock( *(serializer.get()), std::adopt_lock); - ret = sal_lc->get_entry(obj_names[index], bucket_entry_marker, &entry); + rgw::sal::LCEntry entry; + ret = sal_lc->get_entry(this, null_yield, obj_names[index], + bucket_entry_marker, entry); if (ret >= 0) { - if (entry->get_status() == lc_processing) { - if (expired_session(entry->get_start_time())) { + if (entry.status == lc_processing) { + if (expired_session(entry.start_time)) { ldpp_dout(this, 5) << "RGWLC::process_bucket(): STALE lc session found for: " << entry << " index: " << index << " worker ix: " << worker->ix << " (clearing)" @@ -2072,7 +2089,7 @@ int RGWLC::process_bucket(int index, int max_lock_secs, LCWorker* worker, } /* do nothing if no bucket */ - if ((! entry) || entry->get_bucket().empty()) { + if ((ret < 0) || entry.bucket.empty()) { return ret; } @@ -2080,11 +2097,11 @@ int RGWLC::process_bucket(int index, int max_lock_secs, LCWorker* worker, << " index: " << index << " worker ix: " << worker->ix << dendl; - entry->set_status(lc_processing); - ret = sal_lc->set_entry(obj_names[index], *entry); + entry.status = lc_processing; + ret = sal_lc->set_entry(this, null_yield, obj_names[index], entry); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::process_bucket() failed to set obj entry " - << obj_names[index] << entry->get_bucket() << entry->get_status() + << obj_names[index] << entry.bucket << entry.status << dendl; return ret; } @@ -2094,10 +2111,10 @@ int RGWLC::process_bucket(int index, int max_lock_secs, LCWorker* worker, << dendl; lock.unlock(); - ret = bucket_lc_process(entry->get_bucket(), worker, thread_stop_at(), once); + ret = bucket_lc_process(entry.bucket, worker, thread_stop_at(), once); ldpp_dout(this, 5) << "RGWLC::process_bucket(): END entry 2: " << entry << " index: " << index << " worker ix: " << worker->ix << " ret: " << ret << dendl; - bucket_lc_post(index, max_lock_secs, *entry, ret, worker); + bucket_lc_post(index, max_lock_secs, entry, ret, worker); return ret; } /* RGWLC::process_bucket */ @@ -2142,14 +2159,15 @@ static inline bool already_run_today(CephContext* cct, time_t start_date) } /* already_run_today */ inline int RGWLC::advance_head(const std::string& lc_shard, - rgw::sal::Lifecycle::LCHead& head, - rgw::sal::Lifecycle::LCEntry& entry, + rgw::sal::LCHead& head, + const rgw::sal::LCEntry& entry, time_t start_date) { int ret{0}; - std::unique_ptr<rgw::sal::Lifecycle::LCEntry> next_entry; + rgw::sal::LCEntry next_entry; - ret = sal_lc->get_next_entry(lc_shard, entry.get_bucket(), &next_entry); + ret = sal_lc->get_next_entry(this, null_yield, lc_shard, + entry.bucket, next_entry); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::process() failed to get obj entry " << lc_shard << dendl; @@ -2157,10 +2175,10 @@ inline int RGWLC::advance_head(const std::string& lc_shard, } /* save the next position */ - head.set_marker(next_entry->get_bucket()); - head.set_start_date(start_date); + head.marker = next_entry.bucket; + head.start_date = start_date; - ret = sal_lc->put_head(lc_shard, head); + ret = sal_lc->put_head(this, null_yield, lc_shard, head); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::process() failed to put head " << lc_shard @@ -2172,18 +2190,18 @@ exit: } /* advance head */ inline int RGWLC::check_if_shard_done(const std::string& lc_shard, - rgw::sal::Lifecycle::LCHead& head, int worker_ix) + rgw::sal::LCHead& head, int worker_ix) { int ret{0}; - if (head.get_marker().empty()) { + if (head.marker.empty()) { /* done with this shard */ ldpp_dout(this, 5) << "RGWLC::process() next_entry not found. cycle finished lc_shard=" << lc_shard << " worker=" << worker_ix << dendl; - head.set_shard_rollover_date(ceph_clock_now()); - ret = sal_lc->put_head(lc_shard, head); + head.shard_rollover_date = ceph_clock_now(); + ret = sal_lc->put_head(this, null_yield, lc_shard, head); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::process() failed to put head " << lc_shard @@ -2195,8 +2213,8 @@ inline int RGWLC::check_if_shard_done(const std::string& lc_shard, } inline int RGWLC::update_head(const std::string& lc_shard, - rgw::sal::Lifecycle::LCHead& head, - rgw::sal::Lifecycle::LCEntry& entry, + rgw::sal::LCHead& head, + rgw::sal::LCEntry& entry, time_t start_date, int worker_ix) { int ret{0}; @@ -2226,8 +2244,8 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, int ret{0}; const auto& lc_shard = obj_names[index]; - std::unique_ptr<rgw::sal::Lifecycle::LCHead> head; - std::unique_ptr<rgw::sal::Lifecycle::LCEntry> entry; //string = bucket_name:bucket_id, start_time, int = LC_BUCKET_STATUS + rgw::sal::LCHead head; + rgw::sal::LCEntry entry; //string = bucket_name:bucket_id, start_time, int = LC_BUCKET_STATUS ldpp_dout(this, 5) << "RGWLC::process(): ENTER: " << "index: " << index << " worker ix: " << worker->ix @@ -2261,7 +2279,7 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, utime_t now = ceph_clock_now(); /* preamble: find an inital bucket/marker */ - ret = sal_lc->get_head(lc_shard, &head); + ret = sal_lc->get_head(this, null_yield, lc_shard, head); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::process() failed to get obj head " << lc_shard << ", ret=" << ret << dendl; @@ -2270,17 +2288,18 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, /* if there is nothing at head, try to reinitialize head.marker with the * first entry in the queue */ - if (head->get_marker().empty() && - allow_shard_rollover(cct, now, head->get_shard_rollover_date()) /* prevent multiple passes by diff. + if (head.marker.empty() && + allow_shard_rollover(cct, now, head.shard_rollover_date) /* prevent multiple passes by diff. * rgws,in same cycle */) { ldpp_dout(this, 5) << "RGWLC::process() process shard rollover lc_shard=" << lc_shard - << " head.marker=" << head->get_marker() - << " head.shard_rollover_date=" << head->get_shard_rollover_date() + << " head.marker=" << head.marker + << " head.shard_rollover_date=" << head.shard_rollover_date << dendl; - vector<std::unique_ptr<rgw::sal::Lifecycle::LCEntry>> entries; - int ret = sal_lc->list_entries(lc_shard, head->get_marker(), 1, entries); + vector<rgw::sal::LCEntry> entries; + int ret = sal_lc->list_entries(this, null_yield, lc_shard, + head.marker, 1, entries); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::process() sal_lc->list_entries(lc_shard, head.marker, 1, " << "entries) returned error ret==" << ret << dendl; @@ -2288,26 +2307,27 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, } if (entries.size() > 0) { entry = std::move(entries.front()); - head->set_marker(entry->get_bucket()); - head->set_start_date(now); - head->set_shard_rollover_date(0); + head.marker = entry.bucket; + head.start_date= now; + head.shard_rollover_date = 0; } } else { ldpp_dout(this, 0) << "RGWLC::process() head.marker !empty() at START for shard==" << lc_shard << " head last stored at " - << rgw_to_asctime(utime_t(time_t(head->get_start_date()), 0)) + << rgw_to_asctime(utime_t(head.start_date, 0)) << dendl; /* fetches the entry pointed to by head.bucket */ - ret = sal_lc->get_entry(lc_shard, head->get_marker(), &entry); + ret = sal_lc->get_entry(this, null_yield, lc_shard, + head.marker, entry); if (ret == -ENOENT) { /* skip to next entry */ - std::unique_ptr<rgw::sal::Lifecycle::LCEntry> tmp_entry = sal_lc->get_entry(); - tmp_entry->set_bucket(head->get_marker()); + rgw::sal::LCEntry tmp_entry; + tmp_entry.bucket = head.marker; - if (update_head(lc_shard, *head.get(), *tmp_entry.get(), now, worker->ix) != 0) { - goto exit; - } + if (update_head(lc_shard, head, tmp_entry, now, worker->ix) != 0) { + goto exit; + } continue; } if (ret < 0) { @@ -2317,9 +2337,9 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, } } - if (entry && !entry->get_bucket().empty()) { - if (entry->get_status() == lc_processing) { - if (expired_session(entry->get_start_time())) { + if (!entry.bucket.empty()) { + if (entry.status == lc_processing) { + if (expired_session(entry.start_time)) { ldpp_dout(this, 5) << "RGWLC::process(): STALE lc session found for: " << entry << " index: " << index << " worker ix: " << worker->ix @@ -2329,19 +2349,19 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, << "RGWLC::process(): ACTIVE entry: " << entry << " index: " << index << " worker ix: " << worker->ix << dendl; /* skip to next entry */ - if (update_head(lc_shard, *head.get(), *entry.get(), now, worker->ix) != 0) { + if (update_head(lc_shard, head, entry, now, worker->ix) != 0) { goto exit; } continue; } } else { - if ((entry->get_status() == lc_complete) && - already_run_today(cct, entry->get_start_time())) { + if ((entry.status == lc_complete) && + already_run_today(cct, entry.start_time)) { ldpp_dout(this, 5) << "RGWLC::process() worker ix: " << worker->ix - << " SKIP processing for already-processed bucket " << entry->get_bucket() + << " SKIP processing for already-processed bucket " << entry.bucket << dendl; /* skip to next entry */ - if (update_head(lc_shard, *head.get(), *entry.get(), now, worker->ix) != 0) { + if (update_head(lc_shard, head, entry, now, worker->ix) != 0) { goto exit; } continue; @@ -2363,18 +2383,18 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, << " index: " << index << " worker ix: " << worker->ix << dendl; - entry->set_status(lc_processing); - entry->set_start_time(now); + entry.status = lc_processing; + entry.start_time = now; - ret = sal_lc->set_entry(lc_shard, *entry); + ret = sal_lc->set_entry(this, null_yield, lc_shard, entry); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::process() failed to set obj entry " - << lc_shard << entry->get_bucket() << entry->get_status() << dendl; + << lc_shard << entry.bucket << entry.status << dendl; goto exit; } /* advance head for next waiter, then process */ - if (advance_head(lc_shard, *head.get(), *entry.get(), now) < 0) { + if (advance_head(lc_shard, head, entry, now) < 0) { goto exit; } @@ -2385,7 +2405,7 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, /* drop lock so other instances can make progress while this * bucket is being processed */ lock->unlock(); - ret = bucket_lc_process(entry->get_bucket(), worker, thread_stop_at(), once); + ret = bucket_lc_process(entry.bucket, worker, thread_stop_at(), once); ldpp_dout(this, 5) << "RGWLC::process(): END entry 2: " << entry << " index: " << index << " worker ix: " << worker->ix << " ret: " << ret << dendl; @@ -2402,7 +2422,7 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, /* XXXX are we SURE the only way result could == ENOENT is when * there is no such bucket? It is currently the value returned * from bucket_lc_process(...) */ - ret = sal_lc->rm_entry(lc_shard, *entry); + ret = sal_lc->rm_entry(this, null_yield, lc_shard, entry); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::process() failed to remove entry " << lc_shard << " (nonfatal)" @@ -2411,11 +2431,11 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, } } else { if (ret < 0) { - entry->set_status(lc_failed); + entry.status = lc_failed; } else { - entry->set_status(lc_complete); + entry.status = lc_complete; } - ret = sal_lc->set_entry(lc_shard, *entry); + ret = sal_lc->set_entry(this, null_yield, lc_shard, entry); if (ret < 0) { ldpp_dout(this, 0) << "RGWLC::process() failed to set entry on lc_shard=" << lc_shard << " entry=" << entry @@ -2425,7 +2445,7 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker, } } - if (check_if_shard_done(lc_shard, *head.get(), worker->ix) != 0 ) { + if (check_if_shard_done(lc_shard, head, worker->ix) != 0 ) { goto exit; } } while(1 && !once && !going_down()); @@ -2564,9 +2584,9 @@ static int guard_lc_modify(const DoutPrefixProvider *dpp, get_lc_oid(cct, bucket_lc_key, &oid); /* XXX it makes sense to take shard_id for a bucket_id? */ - std::unique_ptr<rgw::sal::Lifecycle::LCEntry> entry = sal_lc->get_entry(); - entry->set_bucket(bucket_lc_key); - entry->set_status(lc_uninitial); + rgw::sal::LCEntry entry; + entry.bucket = bucket_lc_key; + entry.status = lc_uninitial; int max_lock_secs = cct->_conf->rgw_lc_lock_max_time; std::unique_ptr<rgw::sal::LCSerializer> lock = @@ -2593,7 +2613,7 @@ static int guard_lc_modify(const DoutPrefixProvider *dpp, << oid << ", ret=" << ret << dendl; break; } - ret = f(sal_lc, oid, *entry.get()); + ret = f(sal_lc, oid, entry); if (ret < 0) { ldpp_dout(dpp, 0) << "RGWLC::RGWPutLC() failed to set entry on " << oid << ", ret=" << ret << dendl; @@ -2604,9 +2624,10 @@ static int guard_lc_modify(const DoutPrefixProvider *dpp, return ret; } -int RGWLC::set_bucket_config(rgw::sal::Bucket* bucket, - const rgw::sal::Attrs& bucket_attrs, - RGWLifecycleConfiguration *config) +int RGWLC::set_bucket_config(const DoutPrefixProvider* dpp, optional_yield y, + rgw::sal::Bucket* bucket, + const rgw::sal::Attrs& bucket_attrs, + RGWLifecycleConfiguration *config) { int ret{0}; rgw::sal::Attrs attrs = bucket_attrs; @@ -2617,8 +2638,7 @@ int RGWLC::set_bucket_config(rgw::sal::Bucket* bucket, config->encode(lc_bl); attrs[RGW_ATTR_LC] = std::move(lc_bl); - ret = - bucket->merge_and_store_attrs(this, attrs, null_yield); + ret = bucket->merge_and_store_attrs(dpp, attrs, y); if (ret < 0) { return ret; } @@ -2627,16 +2647,17 @@ int RGWLC::set_bucket_config(rgw::sal::Bucket* bucket, rgw_bucket& b = bucket->get_key(); - ret = guard_lc_modify(this, driver, sal_lc.get(), b, cookie, + ret = guard_lc_modify(dpp, driver, sal_lc.get(), b, cookie, [&](rgw::sal::Lifecycle* sal_lc, const string& oid, - rgw::sal::Lifecycle::LCEntry& entry) { - return sal_lc->set_entry(oid, entry); + rgw::sal::LCEntry& entry) { + return sal_lc->set_entry(dpp, y, oid, entry); }); return ret; } -int RGWLC::remove_bucket_config(rgw::sal::Bucket* bucket, +int RGWLC::remove_bucket_config(const DoutPrefixProvider* dpp, optional_yield y, + rgw::sal::Bucket* bucket, const rgw::sal::Attrs& bucket_attrs, bool merge_attrs) { @@ -2646,19 +2667,19 @@ int RGWLC::remove_bucket_config(rgw::sal::Bucket* bucket, if (merge_attrs) { attrs.erase(RGW_ATTR_LC); - ret = bucket->merge_and_store_attrs(this, attrs, null_yield); + ret = bucket->merge_and_store_attrs(dpp, attrs, y); if (ret < 0) { - ldpp_dout(this, 0) << "RGWLC::RGWDeleteLC() failed to set attrs on bucket=" + ldpp_dout(dpp, 0) << "RGWLC::RGWDeleteLC() failed to set attrs on bucket=" << b.name << " returned err=" << ret << dendl; return ret; } } - ret = guard_lc_modify(this, driver, sal_lc.get(), b, cookie, + ret = guard_lc_modify(dpp, driver, sal_lc.get(), b, cookie, [&](rgw::sal::Lifecycle* sal_lc, const string& oid, - rgw::sal::Lifecycle::LCEntry& entry) { - return sal_lc->rm_entry(oid, entry); + rgw::sal::LCEntry& entry) { + return sal_lc->rm_entry(dpp, y, oid, entry); }); return ret; @@ -2686,13 +2707,13 @@ int fix_lc_shard_entry(const DoutPrefixProvider *dpp, std::string lc_oid; get_lc_oid(driver->ctx(), bucket_lc_key, &lc_oid); - std::unique_ptr<rgw::sal::Lifecycle::LCEntry> entry; + rgw::sal::LCEntry entry; // There are multiple cases we need to encounter here // 1. entry exists and is already set to marker, happens in plain buckets & newly resharded buckets // 2. entry doesn't exist, which usually happens when reshard has happened prior to update and next LC process has already dropped the update // 3. entry exists matching the current bucket id which was after a reshard (needs to be updated to the marker) // We are not dropping the old marker here as that would be caught by the next LC process update - int ret = sal_lc->get_entry(lc_oid, bucket_lc_key, &entry); + int ret = sal_lc->get_entry(dpp, null_yield, lc_oid, bucket_lc_key, entry); if (ret == 0) { ldpp_dout(dpp, 5) << "Entry already exists, nothing to do" << dendl; return ret; // entry is already existing correctly set to marker @@ -2708,10 +2729,10 @@ int fix_lc_shard_entry(const DoutPrefixProvider *dpp, ret = guard_lc_modify(dpp, driver, sal_lc, bucket->get_key(), cookie, - [&lc_oid](rgw::sal::Lifecycle* slc, + [dpp, &lc_oid](rgw::sal::Lifecycle* slc, const string& oid, - rgw::sal::Lifecycle::LCEntry& entry) { - return slc->set_entry(lc_oid, entry); + rgw::sal::LCEntry& entry) { + return slc->set_entry(dpp, null_yield, lc_oid, entry); }); } |