From faa60bc1a9d5db299aafb873991d10bcef9a51b1 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 25 Feb 2016 10:41:01 -0500 Subject: [PATCH] rgw: pull first log period from master if not found locally Signed-off-by: Casey Bodley --- src/rgw/rgw_sync.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index 2fe72de8f1a..ab7a487fa83 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -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; -- 2.39.5