uint64_t olh_epoch,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider* dpp,
optional_yield y)
{
uint64_t olh_epoch,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider* dpp,
optional_yield y) override;
virtual bool placement_rules_match(rgw_placement_rule& r1,
CephContext* cct,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider* dpp,
optional_yield y)
{
CephContext* cct,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider* dpp,
optional_yield y) override;
virtual bool placement_rules_match(rgw_placement_rule& r1, rgw_placement_rule& r2) override;
RGWObjTier& tier_config,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider *dpp,
optional_yield y) {
return ret;
}
- // this returned size can be used to send bucket notification
- return accounted_size;
+ // set size to be used to send bucket notification
+ size = accounted_size;
+ return 0;
}
int RGWRados::check_bucket_empty(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, optional_yield y)
RGWObjTier& tier_config,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider *dpp,
optional_yield y);
CephContext* cct,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider* dpp,
optional_yield y)
{
* avoid any races */
ret = store->getRados()->restore_obj_from_cloud(tier_ctx, *rados_ctx,
bucket->get_info(), get_obj(),
- tier_config, days, in_progress, dpp, y);
+ tier_config, days, in_progress, size, dpp, y);
if (ret < 0) { //failed to restore
ldpp_dout(dpp, 0) << "Restoring object(" << get_key() << ") from the cloud endpoint(" << endpoint << ") failed, ret=" << ret << dendl;
CephContext* cct,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider* dpp,
optional_yield y) override;
virtual bool placement_rules_match(rgw_placement_rule& r1, rgw_placement_rule& r2) override;
goto done;
}
+ uint64_t size;
// now go ahead with restoring object
- // XXX: first check if its already restored?
- ret = obj->restore_obj_from_cloud(bucket.get(), tier.get(), cct, days, in_progress,
+ ret = obj->restore_obj_from_cloud(bucket.get(), tier.get(), cct, days, in_progress, size,
this, y);
if (ret < 0) {
ldpp_dout(this, -1) << __PRETTY_FUNCTION__ << ": Restore of object(" << obj->get_key() << ") failed" << ret << dendl;
etag = rgw_bl_str(attr_iter->second);
}
- uint64_t size = ret;
// send notification in case the restore is successfully completed
send_notification(this, driver, obj.get(), bucket.get(), etag, size,
obj->get_key().instance,
CephContext* cct,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider* dpp,
optional_yield y) = 0;
/** Check to see if two placement rules match */
CephContext* cct,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider* dpp,
optional_yield y)
{
return next->restore_obj_from_cloud(nextBucket(bucket), nextPlacementTier(tier),
- cct, days, in_progress, dpp, y);
+ cct, days, in_progress, size, dpp, y);
}
bool FilterObject::placement_rules_match(rgw_placement_rule& r1, rgw_placement_rule& r2)
CephContext* cct,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider* dpp,
optional_yield y) override;
virtual bool placement_rules_match(rgw_placement_rule& r1, rgw_placement_rule& r2) override;
CephContext* cct,
std::optional<uint64_t> days,
bool& in_progress,
+ uint64_t& size,
const DoutPrefixProvider* dpp,
optional_yield y) override {
return -1;