From 5d101bd7d25a67130d437d417b52020c64423b7a Mon Sep 17 00:00:00 2001 From: Tianshan Qu Date: Thu, 5 Sep 2019 18:02:01 +0800 Subject: [PATCH] rgw: improve data sync restart after failure RGWDataSyncShardCR will be reinited by RGWDataSyncShardControlCR after error return, the sync_marker is old one since it's read in RGWDataSyncShardControlCR's start process, so keep it updated to prevent redo some sync process. Signed-off-by: Tianshan Qu --- src/rgw/rgw_data_sync.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 4c81ffe7571d6..020e666f99aba 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1111,7 +1111,7 @@ class RGWDataSyncShardCR : public RGWCoroutine { rgw_pool pool; uint32_t shard_id; - rgw_data_sync_marker sync_marker; + rgw_data_sync_marker& sync_marker; RGWRadosGetOmapKeysCR::ResultPtr omapkeys; std::set entries; @@ -1168,7 +1168,7 @@ class RGWDataSyncShardCR : public RGWCoroutine { public: RGWDataSyncShardCR(RGWDataSyncEnv *_sync_env, rgw_pool& _pool, - uint32_t _shard_id, const rgw_data_sync_marker& _marker, + uint32_t _shard_id, rgw_data_sync_marker& _marker, RGWSyncTraceNodeRef& _tn, bool *_reset_backoff) : RGWCoroutine(_sync_env->cct), sync_env(_sync_env), -- 2.39.5