summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_sal_dbstore.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rgw/rgw_sal_dbstore.h')
-rw-r--r--src/rgw/rgw_sal_dbstore.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/rgw/rgw_sal_dbstore.h b/src/rgw/rgw_sal_dbstore.h
index 107ba735a63..4df10d1dce1 100644
--- a/src/rgw/rgw_sal_dbstore.h
+++ b/src/rgw/rgw_sal_dbstore.h
@@ -268,22 +268,22 @@ protected:
class DBZone : public StoreZone {
protected:
DBStore* store;
- RGWRealm *realm{nullptr};
- DBZoneGroup *zonegroup{nullptr};
- RGWZone *zone_public_config{nullptr}; /* external zone params, e.g., entrypoints, log flags, etc. */
- RGWZoneParams *zone_params{nullptr}; /* internal zone params, e.g., rados pools */
- RGWPeriod *current_period{nullptr};
+ std::unique_ptr<RGWRealm> realm;
+ std::unique_ptr<DBZoneGroup> zonegroup;
+ std::unique_ptr<RGWZone> zone_public_config; /* external zone params, e.g., entrypoints, log flags, etc. */
+ std::unique_ptr<RGWZoneParams> zone_params; /* internal zone params, e.g., rados pools */
+ std::unique_ptr<RGWPeriod> current_period;
public:
DBZone(DBStore* _store) : store(_store) {
- realm = new RGWRealm();
+ realm = std::make_unique<RGWRealm>();
std::unique_ptr<RGWZoneGroup> rzg = std::make_unique<RGWZoneGroup>("default", "default");
rzg->api_name = "default";
rzg->is_master = true;
- zonegroup = new DBZoneGroup(store, std::move(rzg));
- zone_public_config = new RGWZone();
- zone_params = new RGWZoneParams();
- current_period = new RGWPeriod();
+ zonegroup = std::make_unique<DBZoneGroup>(store, std::move(rzg));
+ zone_public_config = std::make_unique<RGWZone>();
+ zone_params = std::make_unique<RGWZoneParams>();
+ current_period = std::make_unique<RGWPeriod>();
// XXX: only default and STANDARD supported for now
RGWZonePlacementInfo info;
@@ -292,13 +292,7 @@ protected:
info.storage_classes = sc;
zone_params->placement_pools["default"] = info;
}
- ~DBZone() {
- delete realm;
- delete zonegroup;
- delete zone_public_config;
- delete zone_params;
- delete current_period;
- }
+ ~DBZone() = default;
virtual std::unique_ptr<Zone> clone() override {
return std::make_unique<DBZone>(store);
@@ -309,7 +303,6 @@ protected:
virtual const std::string& get_name() const override;
virtual bool is_writeable() override;
virtual bool get_redirect_endpoint(std::string* endpoint) override;
- virtual bool has_zonegroup_api(const std::string& api) const override;
virtual const std::string& get_current_period_id() override;
virtual const RGWAccessKey& get_system_key() override;
virtual const std::string& get_realm_name() override;
@@ -535,6 +528,7 @@ protected:
DBObject(DBObject& _o) = default;
+ virtual unsigned get_subsys() { return ceph_subsys_rgw_dbstore; };
virtual int delete_object(const DoutPrefixProvider* dpp,
optional_yield y,
uint32_t flags,
@@ -560,6 +554,13 @@ protected:
virtual int set_acl(const RGWAccessControlPolicy& acl) override { acls = acl; return 0; }
virtual int set_obj_attrs(const DoutPrefixProvider* dpp, Attrs* setattrs, Attrs* delattrs, optional_yield y, uint32_t flags) override;
+
+ /** If multipart, enumerate (a range [marker..marker+[min(max_parts, parts_count-1)] of) parts of the object */
+ virtual int list_parts(const DoutPrefixProvider* dpp, CephContext* cct,
+ int max_parts, int marker, int* next_marker,
+ bool* truncated, list_parts_each_t each_func,
+ optional_yield y) override;
+
virtual int load_obj_state(const DoutPrefixProvider* dpp, optional_yield y, bool follow_olh = true) override;
virtual int get_obj_attrs(optional_yield y, const DoutPrefixProvider* dpp, rgw_obj* target_obj = NULL) override;
virtual int modify_obj_attrs(const char* attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider* dpp) override;