Merge pull request #47190 from dang/wip-dang-zipper-filter

RGW - Zipper - Base filter implementation

Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Daniel Gryniewicz 2022-07-29 10:01:04 -04:00 committed by GitHub
commit 953eaefb65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 2180 additions and 511 deletions

View File

@ -3456,6 +3456,18 @@ options:
- rados
- dbstore
- motr
- name: rgw_filter
type: str
level: advanced
desc: experimental Option to set a filter
long_desc: defaults to none. Other valid values are base and trace (both experimental).
default: none
services:
- rgw
enum_values:
- none
- base
- trace
- name: dbstore_db_dir
type: str
level: advanced

View File

@ -133,6 +133,7 @@ set(librgw_common_srcs
rgw_s3select.cc
rgw_role.cc
rgw_sal.cc
rgw_sal_filter.cc
rgw_sal_rados.cc
rgw_string.cc
rgw_tag.cc

View File

@ -573,8 +573,16 @@ namespace rgw {
}
#endif
// Get the filter
std::string rgw_filter = "none";
const auto& config_filter = g_conf().get_val<std::string>("rgw_filter");
if (config_filter == "base") {
rgw_filter = "base";
}
store = StoreManager::get_storage(this, g_ceph_context,
rgw_store,
rgw_filter,
run_gc,
run_lc,
run_quota,

View File

@ -4367,14 +4367,23 @@ int main(int argc, const char **argv)
}
#endif
// Get the filter
std::string rgw_filter = "none";
const auto& config_filter = g_conf().get_val<std::string>("rgw_filter");
if (config_filter == "base") {
rgw_filter = "base";
}
if (raw_storage_op) {
store = StoreManager::get_raw_storage(dpp(),
g_ceph_context,
rgw_store);
rgw_store,
rgw_filter);
} else {
store = StoreManager::get_storage(dpp(),
g_ceph_context,
rgw_store,
rgw_filter,
false,
false,
false,

View File

@ -1707,9 +1707,8 @@ int RGWLC::bucket_lc_post(int index, int max_lock_sec,
{
utime_t lock_duration(cct->_conf->rgw_lc_lock_max_time, 0);
rgw::sal::LCSerializer* lock = sal_lc->get_serializer(lc_index_lock_name,
obj_names[index],
cookie);
std::unique_ptr<rgw::sal::LCSerializer> lock =
sal_lc->get_serializer(lc_index_lock_name, obj_names[index], cookie);
ldpp_dout(this, 5) << "RGWLC::bucket_lc_post(): POST " << entry
<< " index: " << index << " worker ix: " << worker->ix
@ -1753,7 +1752,6 @@ int RGWLC::bucket_lc_post(int index, int max_lock_sec,
}
clean:
lock->unlock();
delete lock;
ldpp_dout(this, 20) << "RGWLC::bucket_lc_post() unlock "
<< obj_names[index] << dendl;
return 0;
@ -1902,9 +1900,9 @@ int RGWLC::process_bucket(int index, int max_lock_secs, LCWorker* worker,
<< dendl;
int ret = 0;
std::unique_ptr<rgw::sal::LCSerializer> serializer(
std::unique_ptr<rgw::sal::LCSerializer> serializer =
sal_lc->get_serializer(lc_index_lock_name, obj_names[index],
std::string()));
std::string());
std::unique_ptr<rgw::sal::Lifecycle::LCEntry> entry;
if (max_lock_secs <= 0) {
@ -2055,7 +2053,7 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker,
<< "index: " << index << " worker ix: " << worker->ix
<< dendl;
rgw::sal::LCSerializer* lock =
std::unique_ptr<rgw::sal::LCSerializer> lock =
sal_lc->get_serializer(lc_index_lock_name, lc_shard, std::string());
utime_t lock_for_s(max_lock_secs, 0);
@ -2076,7 +2074,7 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker,
ldpp_dout(this, 0) << "RGWLC::process(): failed to aquire lock on "
<< lc_shard << " after " << shard_lock.get_retries()
<< dendl;
goto notlocked;
return 0;
}
do {
@ -2235,7 +2233,7 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker,
ldpp_dout(this, 0) << "RGWLC::process(): failed to aquire lock on "
<< lc_shard << " after " << shard_lock.get_retries()
<< dendl;
goto notlocked;
return 0;
}
if (ret == -ENOENT) {
@ -2284,8 +2282,6 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker,
exit:
lock->unlock();
notlocked:
delete lock;
return 0;
}
@ -2417,9 +2413,8 @@ static int guard_lc_modify(const DoutPrefixProvider *dpp,
entry->set_status(lc_uninitial);
int max_lock_secs = cct->_conf->rgw_lc_lock_max_time;
rgw::sal::LCSerializer* lock = sal_lc->get_serializer(lc_index_lock_name,
oid,
cookie);
std::unique_ptr<rgw::sal::LCSerializer> lock =
sal_lc->get_serializer(lc_index_lock_name, oid, cookie);
utime_t time(max_lock_secs, 0);
int ret;
@ -2445,7 +2440,6 @@ static int guard_lc_modify(const DoutPrefixProvider *dpp,
break;
} while(true);
lock->unlock();
delete lock;
return ret;
}

View File

@ -395,9 +395,17 @@ int radosgw_Main(int argc, const char **argv)
}
#endif
// Get the filter
std::string rgw_filter = "none";
const auto& config_filter = g_conf().get_val<std::string>("rgw_filter");
if (config_filter == "base") {
rgw_filter = "base";
}
rgw::sal::Store* store =
StoreManager::get_storage(&dp, g_ceph_context,
rgw_store,
rgw_filter,
g_conf()->rgw_enable_gc_threads,
g_conf()->rgw_enable_lc_threads,
g_conf()->rgw_enable_quota_threads,

View File

@ -80,7 +80,7 @@ int main(const int argc, const char **argv)
common_init_finish(g_ceph_context);
const DoutPrefix dp(cct.get(), dout_subsys, "rgw object expirer: ");
store = StoreManager::get_storage(&dp, g_ceph_context, "rados", false, false, false, false, false);
store = StoreManager::get_storage(&dp, g_ceph_context, "rados", "none", false, false, false, false, false);
if (!store) {
std::cerr << "couldn't init storage provider" << std::endl;
return EIO;

View File

@ -6464,10 +6464,10 @@ bool RGWCompleteMultipart::check_previously_completed(const RGWMultiCompleteUplo
void RGWCompleteMultipart::complete()
{
/* release exclusive lock iff not already */
if (unlikely(serializer && serializer->is_locked())) {
if (unlikely(serializer.get() && serializer->is_locked())) {
int r = serializer->unlock();
if (r < 0) {
ldpp_dout(this, 0) << "WARNING: failed to unlock " << serializer << dendl;
ldpp_dout(this, 0) << "WARNING: failed to unlock " << *serializer.get() << dendl;
}
}
send_response();

View File

@ -1861,12 +1861,12 @@ protected:
std::string etag;
std::string version_id;
bufferlist data;
rgw::sal::MPSerializer* serializer;
std::unique_ptr<rgw::sal::MPSerializer> serializer;
jspan multipart_trace;
public:
RGWCompleteMultipart() : serializer(nullptr) {}
~RGWCompleteMultipart() override { delete serializer; }
RGWCompleteMultipart() {}
~RGWCompleteMultipart() = default;
int verify_permission(optional_yield y) override;
void pre_exec() override;

View File

@ -108,6 +108,7 @@ void RGWRealmReloader::reload()
store =
StoreManager::get_storage(&dp, cct,
"rados",
"none",
cct->_conf->rgw_enable_gc_threads,
cct->_conf->rgw_enable_lc_threads,
cct->_conf->rgw_enable_quota_threads,

View File

@ -44,6 +44,7 @@ extern rgw::sal::Store* newDBStore(CephContext *cct);
#ifdef WITH_RADOSGW_MOTR
extern rgw::sal::Store* newMotrStore(CephContext *cct);
#endif
extern rgw::sal::Store* newBaseFilter(rgw::sal::Store* next);
}
RGWObjState::RGWObjState() {
@ -81,10 +82,12 @@ RGWObjState::RGWObjState(const RGWObjState& rhs) : obj (rhs.obj) {
compressed = rhs.compressed;
}
rgw::sal::Store* StoreManager::init_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_cache, bool use_gc)
rgw::sal::Store* StoreManager::init_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, const std::string filter, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_cache, bool use_gc)
{
rgw::sal::Store* store{nullptr};
if (svc.compare("rados") == 0) {
rgw::sal::Store* store = newStore();
store = newStore();
RGWRados* rados = static_cast<rgw::sal::RadosStore* >(store)->getRados();
if ((*rados).set_use_cache(use_cache)
@ -107,12 +110,11 @@ rgw::sal::Store* StoreManager::init_storage_provider(const DoutPrefixProvider* d
delete store;
return nullptr;
}
return store;
}
else if (svc.compare("d3n") == 0) {
rgw::sal::RadosStore *store = new rgw::sal::RadosStore();
store = new rgw::sal::RadosStore();
RGWRados* rados = new D3nRGWDataCache<RGWRados>;
store->setRados(rados);
dynamic_cast<rgw::sal::RadosStore*>(store)->setRados(rados);
rados->set_store(static_cast<rgw::sal::RadosStore* >(store));
if ((*rados).set_use_cache(use_cache)
@ -134,26 +136,22 @@ rgw::sal::Store* StoreManager::init_storage_provider(const DoutPrefixProvider* d
delete store;
return nullptr;
}
return store;
}
#ifdef WITH_RADOSGW_DBSTORE
if (svc.compare("dbstore") == 0) {
rgw::sal::Store* store = newDBStore(cct);
else if (svc.compare("dbstore") == 0) {
store = newDBStore(cct);
if ((*(rgw::sal::DBStore*)store).set_run_lc_thread(use_lc_thread)
.initialize(cct, dpp) < 0) {
delete store;
return nullptr;
}
return store;
}
#endif
#ifdef WITH_RADOSGW_MOTR
if (svc.compare("motr") == 0) {
rgw::sal::Store* store = newMotrStore(cct);
else if (svc.compare("motr") == 0) {
store = newMotrStore(cct);
if (store == nullptr) {
ldpp_dout(dpp, 0) << "newMotrStore() failed!" << dendl;
return store;
@ -188,15 +186,24 @@ rgw::sal::Store* StoreManager::init_storage_provider(const DoutPrefixProvider* d
ldpp_dout(dpp, 20) << "User display name = " << suser->get_info().display_name << dendl;
ldpp_dout(dpp, 20) << "User email = " << suser->get_info().user_email << dendl;
}
return store;
}
#endif
return nullptr;
if (filter.compare("base") == 0) {
rgw::sal::Store* next = store;
store = newBaseFilter(next);
if (store->initialize(cct, dpp) < 0) {
delete store;
delete next;
return nullptr;
}
}
return store;
}
rgw::sal::Store* StoreManager::init_raw_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc)
rgw::sal::Store* StoreManager::init_raw_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, const std::string filter)
{
rgw::sal::Store* store = nullptr;
if (svc.compare("rados") == 0) {
@ -220,9 +227,7 @@ rgw::sal::Store* StoreManager::init_raw_storage_provider(const DoutPrefixProvide
delete store;
return nullptr;
}
}
if (svc.compare("dbstore") == 0) {
} else if (svc.compare("dbstore") == 0) {
#ifdef WITH_RADOSGW_DBSTORE
store = newDBStore(cct);
@ -230,19 +235,28 @@ rgw::sal::Store* StoreManager::init_raw_storage_provider(const DoutPrefixProvide
delete store;
return nullptr;
}
#else
store = nullptr;
#endif
}
if (svc.compare("motr") == 0) {
} else if (svc.compare("motr") == 0) {
#ifdef WITH_RADOSGW_MOTR
store = newMotrStore(cct);
#else
store = nullptr;
#endif
}
if (filter.compare("base") == 0) {
rgw::sal::Store* next = store;
store = newBaseFilter(next);
if (store->initialize(cct, dpp) < 0) {
delete store;
delete next;
return nullptr;
}
}
return store;
}

View File

@ -989,7 +989,8 @@ class Object {
/** Create a randomized instance ID for this object */
virtual void gen_rand_obj_instance_name() = 0;
/** Get a multipart serializer for this object */
virtual MPSerializer* get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name) = 0;
virtual std::unique_ptr<MPSerializer> get_serializer(const DoutPrefixProvider *dpp,
const std::string& lock_name) = 0;
/** Move the data of an object to new placement storage */
virtual int transition(Bucket* bucket,
const rgw_placement_rule& placement_rule,
@ -1350,7 +1351,9 @@ public:
virtual int put_head(const std::string& oid, LCHead& head) = 0;
/** Get a serializer for lifecycle */
virtual LCSerializer* get_serializer(const std::string& lock_name, const std::string& oid, const std::string& cookie) = 0;
virtual std::unique_ptr<LCSerializer> get_serializer(const std::string& lock_name,
const std::string& oid,
const std::string& cookie) = 0;
};
/**
@ -1461,6 +1464,8 @@ public:
virtual int get_zone_count() const = 0;
/** Get the placement tier associated with the rule */
virtual int get_placement_tier(const rgw_placement_rule& rule, std::unique_ptr<PlacementTier>* tier) = 0;
/** Clone a copy of this zonegroup. */
virtual std::unique_ptr<ZoneGroup> clone() = 0;
};
/**
@ -1473,6 +1478,8 @@ class Zone {
public:
virtual ~Zone() = default;
/** Clone a copy of this zone. */
virtual std::unique_ptr<Zone> clone() = 0;
/** Get info about the zonegroup containing this zone */
virtual ZoneGroup& get_zonegroup() = 0;
/** Get info about a zonegroup by ID */
@ -1531,21 +1538,21 @@ class StoreManager {
public:
StoreManager() {}
/** Get a full store by service name */
static rgw::sal::Store* get_storage(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, bool use_gc_thread, bool use_lc_thread, bool quota_threads,
static rgw::sal::Store* get_storage(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, const std::string filter, bool use_gc_thread, bool use_lc_thread, bool quota_threads,
bool run_sync_thread, bool run_reshard_thread, bool use_cache = true, bool use_gc = true) {
rgw::sal::Store* store = init_storage_provider(dpp, cct, svc, use_gc_thread, use_lc_thread,
rgw::sal::Store* store = init_storage_provider(dpp, cct, svc, filter, use_gc_thread, use_lc_thread,
quota_threads, run_sync_thread, run_reshard_thread, use_cache, use_gc);
return store;
}
/** Get a stripped down store by service name */
static rgw::sal::Store* get_raw_storage(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc) {
rgw::sal::Store* store = init_raw_storage_provider(dpp, cct, svc);
static rgw::sal::Store* get_raw_storage(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, const std::string filter) {
rgw::sal::Store* store = init_raw_storage_provider(dpp, cct, svc, filter);
return store;
}
/** Initialize a new full Store */
static rgw::sal::Store* init_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_metadata_cache, bool use_gc);
static rgw::sal::Store* init_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, const std::string filter, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_metadata_cache, bool use_gc);
/** Initialize a new raw Store */
static rgw::sal::Store* init_raw_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc);
static rgw::sal::Store* init_raw_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, const std::string filter);
/** Close a Store when it's no longer needed */
static void close_storage(rgw::sal::Store* store);

View File

@ -722,9 +722,10 @@ namespace rgw::sal {
return op_target.obj_omap_set_val_by_key(dpp, key, val, must_exist);
}
MPSerializer* DBObject::get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name)
std::unique_ptr<MPSerializer> DBObject::get_serializer(const DoutPrefixProvider *dpp,
const std::string& lock_name)
{
return new MPDBSerializer(dpp, store, this, lock_name);
return std::make_unique<MPDBSerializer>(dpp, store, this, lock_name);
}
int DBObject::transition(Bucket* bucket,
@ -1807,9 +1808,11 @@ namespace rgw::sal {
return store->getDB()->put_head(oid, head);
}
LCSerializer* DBLifecycle::get_serializer(const std::string& lock_name, const std::string& oid, const std::string& cookie)
std::unique_ptr<LCSerializer> DBLifecycle::get_serializer(const std::string& lock_name,
const std::string& oid,
const std::string& cookie)
{
return new LCDBSerializer(store, oid, lock_name, cookie);
return std::make_unique<LCDBSerializer>(store, oid, lock_name, cookie);
}
std::unique_ptr<Notification> DBStore::get_notification(

View File

@ -55,7 +55,9 @@ public:
virtual int rm_entry(const std::string& oid, LCEntry& entry) override;
virtual int get_head(const std::string& oid, std::unique_ptr<LCHead>* head) override;
virtual int put_head(const std::string& oid, LCHead& head) override;
virtual LCSerializer* get_serializer(const std::string& lock_name, const std::string& oid, const std::string& cookie) override;
virtual std::unique_ptr<LCSerializer> get_serializer(const std::string& lock_name,
const std::string& oid,
const std::string& cookie) override;
};
class DBNotification : public StoreNotification {
@ -287,6 +289,10 @@ protected:
std::unique_ptr<PlacementTier>* tier) {
return -1;
}
virtual std::unique_ptr<ZoneGroup> clone() override {
std::unique_ptr<RGWZoneGroup>zg = std::make_unique<RGWZoneGroup>(*group.get());
return std::make_unique<DBZoneGroup>(store, std::move(zg));
}
};
class DBZone : public StoreZone {
@ -323,6 +329,9 @@ protected:
delete current_period;
}
virtual std::unique_ptr<Zone> clone() override {
return std::make_unique<DBZone>(store);
}
virtual ZoneGroup& get_zonegroup() override;
virtual int get_zonegroup(const std::string& id, std::unique_ptr<ZoneGroup>* zonegroup) override;
const RGWZoneParams& get_rgw_params();
@ -576,7 +585,8 @@ protected:
virtual std::unique_ptr<Object> clone() override {
return std::unique_ptr<Object>(new DBObject(*this));
}
virtual MPSerializer* get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name) override;
virtual std::unique_ptr<MPSerializer> get_serializer(const DoutPrefixProvider *dpp,
const std::string& lock_name) override;
virtual int transition(Bucket* bucket,
const rgw_placement_rule& placement_rule,
const real_time& mtime,

1335
src/rgw/rgw_sal_filter.cc Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1110,9 +1110,10 @@ int MotrObject::omap_set_val_by_key(const DoutPrefixProvider *dpp, const std::st
return 0;
}
MPSerializer* MotrObject::get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name)
std::unique_ptr<MPSerializer> MotrObject::get_serializer(const DoutPrefixProvider *dpp,
const std::string& lock_name)
{
return new MPMotrSerializer(dpp, store, this, lock_name);
return std::make_unique<MPMotrSerializer>(dpp, store, this, lock_name);
}
int MotrObject::transition(Bucket* bucket,

View File

@ -403,6 +403,9 @@ public:
}
virtual int get_placement_tier(const rgw_placement_rule& rule, std::unique_ptr<PlacementTier>* tier);
const RGWZoneGroup& get_group() { return group; }
virtual std::unique_ptr<ZoneGroup> clone() override {
return std::make_unique<MotrZoneGroup>(store, group);
}
};
class MotrZone : public StoreZone {
@ -446,6 +449,9 @@ class MotrZone : public StoreZone {
}
~MotrZone() = default;
virtual std::unique_ptr<Zone> clone() override {
return std::make_unique<MotrZone>(store);
}
virtual ZoneGroup& get_zonegroup() override;
virtual int get_zonegroup(const std::string& id, std::unique_ptr<ZoneGroup>* zonegroup) override;
virtual const rgw_zone_id& get_id() override;
@ -609,7 +615,7 @@ class MotrObject : public StoreObject {
virtual std::unique_ptr<Object> clone() override {
return std::unique_ptr<Object>(new MotrObject(*this));
}
virtual MPSerializer* get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name) override;
virtual std::unique_ptr<MPSerializer> get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name) override;
virtual int transition(Bucket* bucket,
const rgw_placement_rule& placement_rule,
const real_time& mtime,

View File

@ -1243,8 +1243,9 @@ int RadosStore::get_raw_chunk_size(const DoutPrefixProvider* dpp, const rgw_raw_
int RadosStore::initialize(CephContext *cct, const DoutPrefixProvider *dpp)
{
RadosZoneGroup zg(this, svc()->zone->get_zonegroup());
zone = make_unique<RadosZone>(this, zg);
std::unique_ptr<ZoneGroup> zg =
std::make_unique<RadosZoneGroup>(this, svc()->zone->get_zonegroup());
zone = make_unique<RadosZone>(this, std::move(zg));
return 0;
}
@ -1721,9 +1722,9 @@ int RadosObject::omap_set_val_by_key(const DoutPrefixProvider *dpp, const std::s
return sysobj.omap().set_must_exist(must_exist).set(dpp, key, val, y);
}
MPSerializer* RadosObject::get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name)
std::unique_ptr<MPSerializer> RadosObject::get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name)
{
return new MPRadosSerializer(dpp, store, this, lock_name);
return std::make_unique<MPRadosSerializer>(dpp, store, this, lock_name);
}
int RadosObject::transition(Bucket* bucket,
@ -2799,9 +2800,11 @@ int RadosLifecycle::put_head(const std::string& oid, LCHead& head)
return cls_rgw_lc_put_head(*store->getRados()->get_lc_pool_ctx(), oid, cls_head);
}
LCSerializer* RadosLifecycle::get_serializer(const std::string& lock_name, const std::string& oid, const std::string& cookie)
std::unique_ptr<LCSerializer> RadosLifecycle::get_serializer(const std::string& lock_name,
const std::string& oid,
const std::string& cookie)
{
return new LCRadosSerializer(store, oid, lock_name, cookie);
return std::make_unique<LCRadosSerializer>(store, oid, lock_name, cookie);
}
int RadosNotification::publish_reserve(const DoutPrefixProvider *dpp, RGWObjTags* obj_tags)
@ -2938,11 +2941,6 @@ int RadosZoneGroup::get_placement_tier(const rgw_placement_rule& rule,
return 0;
}
ZoneGroup& RadosZone::get_zonegroup()
{
return group;
}
int RadosZone::get_zonegroup(const std::string& id, std::unique_ptr<ZoneGroup>* zonegroup)
{
ZoneGroup* zg;

View File

@ -86,17 +86,23 @@ public:
}
virtual int get_placement_tier(const rgw_placement_rule& rule, std::unique_ptr<PlacementTier>* tier);
const RGWZoneGroup& get_group() const { return group; }
virtual std::unique_ptr<ZoneGroup> clone() override {
return std::make_unique<RadosZoneGroup>(store, group);
}
};
class RadosZone : public StoreZone {
protected:
RadosStore* store;
RadosZoneGroup group;
std::unique_ptr<ZoneGroup> group;
public:
RadosZone(RadosStore* _store, RadosZoneGroup _zg) : store(_store), group(_zg) {}
RadosZone(RadosStore* _store, std::unique_ptr<ZoneGroup> _zg) : store(_store), group(std::move(_zg)) {}
~RadosZone() = default;
virtual ZoneGroup& get_zonegroup() override;
virtual std::unique_ptr<Zone> clone() override {
return std::make_unique<RadosZone>(store, group->clone());
}
virtual ZoneGroup& get_zonegroup() override { return *(group.get()); }
virtual int get_zonegroup(const std::string& id, std::unique_ptr<ZoneGroup>* zonegroup) override;
virtual const rgw_zone_id& get_id() override;
virtual const std::string& get_name() const override;
@ -418,7 +424,8 @@ class RadosObject : public StoreObject {
virtual std::unique_ptr<Object> clone() override {
return std::unique_ptr<Object>(new RadosObject(*this));
}
virtual MPSerializer* get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name) override;
virtual std::unique_ptr<MPSerializer> get_serializer(const DoutPrefixProvider *dpp,
const std::string& lock_name) override;
virtual int transition(Bucket* bucket,
const rgw_placement_rule& placement_rule,
const real_time& mtime,
@ -704,7 +711,9 @@ public:
virtual int rm_entry(const std::string& oid, LCEntry& entry) override;
virtual int get_head(const std::string& oid, std::unique_ptr<LCHead>* head) override;
virtual int put_head(const std::string& oid, LCHead& head) override;
virtual LCSerializer* get_serializer(const std::string& lock_name, const std::string& oid, const std::string& cookie) override;
virtual std::unique_ptr<LCSerializer> get_serializer(const std::string& lock_name,
const std::string& oid,
const std::string& cookie) override;
};
class RadosNotification : public StoreNotification {