return 0;
}
+bool DaosStore::process_expired_objects(const DoutPrefixProvider *dpp,
+ optional_yield y) {
+ DAOS_NOT_IMPLEMENTED_LOG(nullptr);
+ return 0;
+}
+
std::unique_ptr<Notification> DaosStore::get_notification(
rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s,
rgw::notify::EventType event_type, const std::string* object_name) {
virtual std::string zone_unique_trans_id(const uint64_t unique_num) override;
virtual int cluster_stat(RGWClusterStat& stats) override;
virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
+ virtual bool process_expired_objects(const DoutPrefixProvider *dpp, optional_yield y) override;
virtual std::unique_ptr<Notification> get_notification(
rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s,
rgw::notify::EventType event_type, optional_yield y,
return 0;
}
+bool MotrStore::process_expired_objects(const DoutPrefixProvider *dpp,
+ optional_yield y)
+{
+ return 0;
+}
+
std::unique_ptr<Notification> MotrStore::get_notification(Object* obj, Object* src_obj, req_state* s,
rgw::notify::EventType event_type, optional_yield y, const string* object_name)
{
virtual int list_all_zones(const DoutPrefixProvider* dpp, std::list<std::string>& zone_ids) override;
virtual int cluster_stat(RGWClusterStat& stats) override;
virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
+ virtual bool process_expired_objects(const DoutPrefixProvider *dpp, optional_yield y) override;
virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj,
req_state* s, rgw::notify::EventType event_type, optional_yield y, const std::string* object_name=nullptr) override;
virtual std::unique_ptr<Notification> get_notification(
return next->register_admin_apis(mgr);
}
+bool POSIXDriver::process_expired_objects(const DoutPrefixProvider *dpp,
+ optional_yield y) {
+ return next->process_expired_objects(dpp, y);
+}
+
std::unique_ptr<Notification> POSIXDriver::get_notification(rgw::sal::Object* obj,
rgw::sal::Object* src_obj, struct req_state* s,
rgw::notify::EventType event_type, optional_yield y,
virtual void finalize(void) override;
virtual void register_admin_apis(RGWRESTMgr* mgr) override;
+ virtual bool process_expired_objects(const DoutPrefixProvider *dpp,
+ optional_yield y) override;
virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj,
rgw::sal::Object* src_obj, struct req_state* s,
rgw::notify::EventType event_type, optional_yield y,
return ret;
}
-bool RGWRados::process_expire_objects(const DoutPrefixProvider *dpp, optional_yield y)
+bool RGWRados::process_expired_objects(const DoutPrefixProvider *dpp, optional_yield y)
{
return obj_expirer->inspect_all_shards(dpp, utime_t(), ceph_clock_now(), y);
}
int list_gc_objs(int *index, std::string& marker, uint32_t max, bool expired_only, std::list<cls_rgw_gc_obj_info>& result, bool *truncated, bool& processing_queue);
int process_gc(bool expired_only, optional_yield y);
- bool process_expire_objects(const DoutPrefixProvider *dpp, optional_yield y);
+ bool process_expired_objects(const DoutPrefixProvider *dpp, optional_yield y);
int defer_gc(const DoutPrefixProvider *dpp, RGWObjectCtx* ctx, RGWBucketInfo& bucket_info, const rgw_obj& obj, optional_yield y);
int process_lc(const std::unique_ptr<rgw::sal::Bucket>& optional_bucket);
return std::make_unique<RadosLifecycle>(this);
}
+bool RadosStore::process_expired_objects(const DoutPrefixProvider *dpp,
+ optional_yield y)
+{
+ return getRados()->process_expired_objects(dpp, y);
+}
+
std::unique_ptr<Notification> RadosStore::get_notification(
rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s, rgw::notify::EventType event_type, optional_yield y, const std::string* object_name)
{
virtual int list_all_zones(const DoutPrefixProvider* dpp, std::list<std::string>& zone_ids) override;
virtual int cluster_stat(RGWClusterStat& stats) override;
virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
+ virtual bool process_expired_objects(const DoutPrefixProvider *dpp, optional_yield y) override;
virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s, rgw::notify::EventType event_type, optional_yield y, const std::string* object_name=nullptr) override;
virtual std::unique_ptr<Notification> get_notification(
const DoutPrefixProvider* dpp,
} // OPT::OBJECT_REINDEX
if (opt_cmd == OPT::OBJECTS_EXPIRE) {
- if (!static_cast<rgw::sal::RadosStore*>(driver)->getRados()->process_expire_objects(dpp(), null_yield)) {
- cerr << "ERROR: process_expire_objects() processing returned error." << std::endl;
+ if (!driver->process_expired_objects(dpp(), null_yield)) {
+ cerr << "ERROR: process_expired_objects() processing returned error." << std::endl;
return 1;
}
}
}
}
- ret = static_cast<rgw::sal::RadosStore*>(driver)->getRados()->process_expire_objects(this, null_yield);
+ ret = driver->process_expired_objects(this, null_yield);
if (ret < 0) {
- ldpp_dout(this, 5) << "RGWLC::process_expire_objects: failed, "
+ ldpp_dout(this, 5) << "RGWLC::process_expired_objects: failed, "
<< " worker ix: " << worker->ix << dendl;
}
virtual int cluster_stat(RGWClusterStat& stats) = 0;
/** Get a @a Lifecycle object. Used to manage/run lifecycle transitions */
virtual std::unique_ptr<Lifecycle> get_lifecycle(void) = 0;
+ /** Reset the temporarily restored objects which are expired */
+ virtual bool process_expired_objects(const DoutPrefixProvider *dpp, optional_yield y) = 0;
/** Get a @a Notification object. Used to communicate with non-RGW daemons, such as
* management/tracking software */
return std::make_unique<DBLifecycle>(this);
}
+ bool DBStore::process_expired_objects(const DoutPrefixProvider *dpp,
+ optional_yield y)
+ {
+ return 0;
+ }
+
int DBLifecycle::get_entry(const DoutPrefixProvider* dpp, optional_yield y,
const std::string& oid, const std::string& marker,
LCEntry& entry)
virtual int list_all_zones(const DoutPrefixProvider* dpp, std::list<std::string>& zone_ids) override;
virtual int cluster_stat(RGWClusterStat& stats) override;
virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
+ virtual bool process_expired_objects(const DoutPrefixProvider *dpp, optional_yield y) override;
virtual std::unique_ptr<Notification> get_notification(
rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s,
return std::make_unique<FilterLifecycle>(std::move(lc));
}
+bool FilterDriver::process_expired_objects(const DoutPrefixProvider *dpp,
+ optional_yield y) {
+ return next->process_expired_objects(dpp, y);
+}
+
std::unique_ptr<Notification> FilterDriver::get_notification(rgw::sal::Object* obj,
rgw::sal::Object* src_obj, req_state* s,
rgw::notify::EventType event_type, optional_yield y,
}
virtual int cluster_stat(RGWClusterStat& stats) override;
virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
+ virtual bool process_expired_objects(const DoutPrefixProvider *dpp, optional_yield y) override;
virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj,
rgw::sal::Object* src_obj, struct req_state* s,