]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: multisite log trimming only checks peers that sync from us
authorCasey Bodley <cbodley@redhat.com>
Fri, 12 Apr 2019 20:30:19 +0000 (16:30 -0400)
committerAshish Singh <assingh@redhat.com>
Fri, 26 Apr 2019 11:08:21 +0000 (16:38 +0530)
if there are peer zones in our zonegroup that do not sync from us, they
won't have any sync status that corresponds to our logs. fetching their
status will give us empty markers, so we'll never make progress with log
trimming

the get_zone_data_notify_to_map() contains only the zones that are
configured to sync from us, so use that instead of get_zone_conn_map()

Fixes: http://tracker.ceph.com/issues/39283
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 3d52f30e6e11ccc22bce86c8c1e1054c6fdb97a6)

src/rgw/rgw_data_sync.cc
src/rgw/rgw_sync_log_trim.cc

index 90eb6bc234410de229b00c2338f6c9397de528c5..77b04bf985de97930e58f4c4dda3e375301669a9 100644 (file)
@@ -3547,7 +3547,7 @@ class DataLogTrimCR : public RGWCoroutine {
     : RGWCoroutine(store->ctx()), store(store), http(http),
       num_shards(num_shards),
       zone_id(store->svc.zone->get_zone().id),
-      peer_status(store->svc.zone->get_zone_conn_map().size()),
+      peer_status(store->svc.zone->get_zone_data_notify_to_map().size()),
       min_shard_markers(num_shards),
       last_trim(last_trim)
   {}
@@ -3570,7 +3570,7 @@ int DataLogTrimCR::operate()
       };
 
       auto p = peer_status.begin();
-      for (auto& c : store->svc.zone->get_zone_conn_map()) {
+      for (auto& c : store->svc.zone->get_zone_data_notify_to_map()) {
         ldout(cct, 20) << "query sync status from " << c.first << dendl;
         using StatusCR = RGWReadRESTResourceCR<rgw_data_sync_status>;
         spawn(new StatusCR(cct, c.second, http, "/admin/log/", params, &*p),
index cae02600477fa8a1af916b3df1188c0a26de4282..db5c817e53bb5149969b86d211f9a189dbeaf787 100644 (file)
@@ -440,7 +440,7 @@ class BucketTrimInstanceCR : public RGWCoroutine {
       http(http), observer(observer),
       bucket_instance(bucket_instance),
       zone_id(store->svc.zone->get_zone().id),
-      peer_status(store->svc.zone->get_zone_conn_map().size())
+      peer_status(store->svc.zone->get_zone_data_notify_to_map().size())
   {}
 
   int operate() override;
@@ -464,7 +464,7 @@ int BucketTrimInstanceCR::operate()
       };
 
       auto p = peer_status.begin();
-      for (auto& c : store->svc.zone->get_zone_conn_map()) {
+      for (auto& c : store->svc.zone->get_zone_data_notify_to_map()) {
         using StatusCR = RGWReadRESTResourceCR<StatusShards>;
         spawn(new StatusCR(cct, c.second, http, "/admin/log/", params, &*p),
               false);