summaryrefslogtreecommitdiffstats
path: root/src/rgw/services/svc_user.h
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@redhat.com>2019-04-27 04:51:10 +0200
committerCasey Bodley <cbodley@redhat.com>2019-07-29 21:20:47 +0200
commit4ca16565ffc719ad66ce9043ee9ae408bd5d6dd7 (patch)
tree946895417553332db1cb9e6e276998797996103b /src/rgw/services/svc_user.h
parentrgw: svc_user adjustments (diff)
downloadceph-4ca16565ffc719ad66ce9043ee9ae408bd5d6dd7.tar.xz
ceph-4ca16565ffc719ad66ce9043ee9ae408bd5d6dd7.zip
rgw: meta_be: provide a backend handler
RGW_MetaBackend_Handler can create a backend context. It is created for each backend user (meta handler). Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Diffstat (limited to 'src/rgw/services/svc_user.h')
-rw-r--r--src/rgw/services/svc_user.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/rgw/services/svc_user.h b/src/rgw/services/svc_user.h
index 144e40ffd36..20310aeb3b4 100644
--- a/src/rgw/services/svc_user.h
+++ b/src/rgw/services/svc_user.h
@@ -26,19 +26,25 @@ class RGWSI_SysObj;
class RGWSI_SysObj_Cache;
class RGWSI_Meta;
class RGWSI_SyncModules;
-class RGWMetadataHandler;
+class RGWSI_MetaBackend_Handler;
struct rgw_cache_entry_info;
template <class T>
class RGWChainedCacheImpl;
+/* FIXME:
+ * split RGWSI_User to base class and RGWSI_User_SObj
+ */
+
class RGWSI_User : public RGWServiceInstance
{
friend class User;
friend class PutOperation;
- RGWMetadataHandler *user_meta_handler;
+ std::unique_ptr<RGWSI_MetaBackend::Module> be_module;
+
+ RGWSI_MetaBackend_Handler *be_handler;
struct user_info_cache_entry {
RGWUserInfo info;
@@ -82,18 +88,22 @@ public:
RGWSI_MetaBackend *_meta_be_svc,
RGWSI_SyncModules *_sync_modules);
+ RGWSI_MetaBackend_Handler *get_be_handler() {
+ return be_handler;
+ }
+
static string get_meta_key(const rgw_user& user) {
return user.to_str();
}
- static string get_buckets_oid(const rgw_user& user_id) {
-#define RGW_BUCKETS_OID_SUFFIX ".buckets"
- return user_id.to_str() + RGW_BUCKETS_OID_SUFFIX;
+ static rgw_user user_from_meta_key(const string& key) {
+ return rgw_user(key);
}
/* base svc_user interfaces */
int read_user_info(RGWSI_MetaBackend::Context *ctx,
+ const rgw_user& user,
RGWUserInfo *info,
RGWObjVersionTracker * const objv_tracker,
real_time * const pmtime,