From: Casey Bodley Date: Tue, 1 May 2018 14:40:20 +0000 (-0400) Subject: rgw: expose struct bucket_index_marker_info in header X-Git-Tag: v12.2.6~131^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dce8a05498cbbc47dc1364892deb509c64ab56f9;p=ceph.git rgw: expose struct bucket_index_marker_info in header Signed-off-by: Casey Bodley (cherry picked from commit 6274368d9cc6566e85b52e53d6949a7814a5ea27) --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 1d4dc7a3a960..703bdd7ee25e 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1819,30 +1819,16 @@ int RGWRemoteBucketLog::init(const string& _source_zone, RGWRESTConn *_conn, return 0; } -struct bucket_index_marker_info { - string bucket_ver; - string master_ver; - string max_marker; - bool syncstopped{false}; - - void decode_json(JSONObj *obj) { - JSONDecoder::decode_json("bucket_ver", bucket_ver, obj); - JSONDecoder::decode_json("master_ver", master_ver, obj); - JSONDecoder::decode_json("max_marker", max_marker, obj); - JSONDecoder::decode_json("syncstopped", syncstopped, obj); - } -}; - class RGWReadRemoteBucketIndexLogInfoCR : public RGWCoroutine { RGWDataSyncEnv *sync_env; const string instance_key; - bucket_index_marker_info *info; + rgw_bucket_index_marker_info *info; public: RGWReadRemoteBucketIndexLogInfoCR(RGWDataSyncEnv *_sync_env, const rgw_bucket_shard& bs, - bucket_index_marker_info *_info) + rgw_bucket_index_marker_info *_info) : RGWCoroutine(_sync_env->cct), sync_env(_sync_env), instance_key(bs.get_key()), info(_info) {} @@ -1855,7 +1841,7 @@ public: { NULL, NULL } }; string p = "/admin/log/"; - call(new RGWReadRESTResourceCR(sync_env->cct, sync_env->conn, sync_env->http_manager, p, pairs, info)); + call(new RGWReadRESTResourceCR(sync_env->cct, sync_env->conn, sync_env->http_manager, p, pairs, info)); } if (retcode < 0) { return set_cr_error(retcode); @@ -1874,7 +1860,7 @@ class RGWInitBucketShardSyncStatusCoroutine : public RGWCoroutine { rgw_bucket_shard_sync_info& status; - bucket_index_marker_info info; + rgw_bucket_index_marker_info info; public: RGWInitBucketShardSyncStatusCoroutine(RGWDataSyncEnv *_sync_env, const rgw_bucket_shard& bs, diff --git a/src/rgw/rgw_data_sync.h b/src/rgw/rgw_data_sync.h index 9af1d4bb64f6..a85a155aa109 100644 --- a/src/rgw/rgw_data_sync.h +++ b/src/rgw/rgw_data_sync.h @@ -466,6 +466,20 @@ struct rgw_bucket_shard_sync_info { }; WRITE_CLASS_ENCODER(rgw_bucket_shard_sync_info) +struct rgw_bucket_index_marker_info { + string bucket_ver; + string master_ver; + string max_marker; + bool syncstopped{false}; + + void decode_json(JSONObj *obj) { + JSONDecoder::decode_json("bucket_ver", bucket_ver, obj); + JSONDecoder::decode_json("master_ver", master_ver, obj); + JSONDecoder::decode_json("max_marker", max_marker, obj); + JSONDecoder::decode_json("syncstopped", syncstopped, obj); + } +}; + class RGWRemoteBucketLog : public RGWCoroutinesManager { RGWRados *store;