]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: data sync: set num_shards when building full maps 19783/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Thu, 9 Nov 2017 14:50:56 +0000 (15:50 +0100)
committerOrit Wasserman <owasserm@redhat.com>
Thu, 4 Jan 2018 20:00:45 +0000 (22:00 +0200)
When radosgw-admin data sync init is called on a cluster, the next run
of rgw crashes as when it processes ListBucketIndexesCR, num_shards
isn't set which is later referenced in ListBucketIndexesCR. Setting the
n sync_info.num_shards correctly to handle this case

Fixes: http://tracker.ceph.com/issues/22083
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 4015a57c473d896164b0617be93777d0947a9576)

Conflicts:
src/rgw/rgw_data_sync.cc

src/rgw/rgw_data_sync.cc

index b16a45ed75948b156ca1189875e21a04c917a73c..233c8ccdd102742eea2ca3cbf174082aa9130e46 100644 (file)
@@ -1421,6 +1421,7 @@ public:
       }
 
       if  ((rgw_data_sync_info::SyncState)sync_status.sync_info.state == rgw_data_sync_info::StateBuildingFullSyncMaps) {
+        sync_status.sync_info.num_shards = num_shards;
         /* state: building full sync maps */
         ldout(sync_env->cct, 20) << __func__ << "(): building full sync maps" << dendl;
         yield call(new RGWListBucketIndexesCR(sync_env, &sync_status));