]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: do not reflect period if not current 21735/head
authorTianshan Qu <tianshan@xsky.com>
Wed, 31 Jan 2018 17:25:55 +0000 (01:25 +0800)
committerPrashant D <pdhange@redhat.com>
Mon, 30 Apr 2018 07:15:43 +0000 (03:15 -0400)
if some history period not exist in local, it will pull
from master and update the old info to zonegroup.

fixes: http://tracker.ceph.com/issues/22844

Signed-off-by: Tianshan Qu <tianshan@xsky.com>
(cherry picked from commit 915404255f32cf92975e3ac82c8f775bb97cc8a5)

src/rgw/rgw_period_puller.cc

index 2c811a358ba1a4f492168097218b8282d884cd24..29d3a0052bbe6b25adc095ec23c26eb30c3f6936 100644 (file)
@@ -95,9 +95,11 @@ int RGWPeriodPuller::pull(const std::string& period_id, RGWPeriod& period)
       return r;
     }
     // reflect period objects if this is the latest version
-    r = period.reflect();
-    if (r < 0) {
-      return r;
+    if (store->realm.get_current_period() == period_id) {
+      r = period.reflect();
+      if (r < 0) {
+        return r;
+      }
     }
     ldout(store->ctx(), 14) << "period " << period_id
         << " pulled and written to local storage" << dendl;