]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add RGWReshard object to RGWRados
authorOrit Wasserman <owasserm@redhat.com>
Tue, 18 Apr 2017 09:37:23 +0000 (12:37 +0300)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 5 Jun 2017 20:17:34 +0000 (13:17 -0700)
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h

index 034416f8e1c76199de5ba2742edc9bfbd11b9f9f..d01c249f3d171bcdecb21c4b5095095124003060 100644 (file)
@@ -69,6 +69,7 @@ using namespace librados;
 #include "rgw_sync.h"
 #include "rgw_data_sync.h"
 #include "rgw_realm_watcher.h"
+#include "rgw_reshard.h"
 
 #include "compressor/Compressor.h"
 
@@ -4265,6 +4266,8 @@ int RGWRados::init_complete()
     obj_tombstone_cache = new tombstone_cache_t(cct->_conf->rgw_obj_tombstone_cache_size);
   }
 
+  reshard = new RGWReshard(cct, this);
+
   return ret;
 }
 
@@ -8223,6 +8226,8 @@ int RGWRados::bucket_check_index(RGWBucketInfo& bucket_info,
 
 int RGWRados::bucket_rebuild_index(RGWBucketInfo& bucket_info)
 {
+  /* hande on going bucket resharding */
+
   librados::IoCtx index_ctx;
   map<int, string> bucket_objs;
   int r = open_bucket_index(bucket_info, index_ctx, bucket_objs);
index c8472e834652c1ad3ba92725736642186ffe108d..4b50699d8612075db73bb843f406b9c2a89e6f32 100644 (file)
@@ -38,6 +38,7 @@ class RGWSyncLogTrimThread;
 class RGWRESTConn;
 struct RGWZoneGroup;
 struct RGWZoneParams;
+class RGWReshard;
 
 /* flags for put_obj_meta() */
 #define PUT_OBJ_CREATE      0x01
@@ -2324,7 +2325,7 @@ public:
                cr_registry(NULL),
                zone_short_id(0),
                rest_master_conn(NULL),
-               meta_mgr(NULL), data_log(NULL) {}
+               meta_mgr(NULL), data_log(NULL), reshard(NULL) {}
 
   uint64_t get_new_req_id() {
     return ++max_req_id;
@@ -2445,6 +2446,8 @@ public:
 
   RGWDataChangesLog *data_log;
 
+  RGWReshard *reshard;
+
   virtual ~RGWRados() = default;
 
   tombstone_cache_t *get_tombstone_cache() {