]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: pull first log period from master if not found locally
authorCasey Bodley <cbodley@redhat.com>
Thu, 25 Feb 2016 15:41:01 +0000 (10:41 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 4 Mar 2016 22:04:09 +0000 (17:04 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_sync.cc

index 2fe72de8f1a0ee66475f4d515ae3adc276d78f80..ab7a487fa8305f21943711f772e287d1f59089fd 100644 (file)
@@ -1676,9 +1676,9 @@ static RGWPeriodHistory::Cursor get_period_at(RGWRados* store,
     return cursor;
   }
 
-  // read the period from rados
-  RGWPeriod period(info.period);
-  int r = period.init(store->ctx(), store, store->realm.get_id());
+  // read the period from rados or pull it from the master
+  RGWPeriod period;
+  int r = store->period_puller->pull(info.period, period);
   if (r < 0) {
     lderr(store->ctx()) << "ERROR: failed to read period id "
         << info.period << ": " << cpp_strerror(r) << dendl;