mirror of
https://github.com/ceph/ceph
synced 2025-01-28 05:53:37 +00:00
rgw: fixes for period puller
* reset epoch=0 before RGWPeriod::init() so we get the latest_epoch * if we're the metadata master, don't try to pull periods from ourself Fixes: http://tracker.ceph.com/issues/16939 Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
parent
367cb8407b
commit
06c384f1c5
@ -57,8 +57,15 @@ int RGWPeriodPuller::pull(const std::string& period_id, RGWPeriod& period)
|
||||
{
|
||||
// try to read the period from rados
|
||||
period.set_id(period_id);
|
||||
period.set_epoch(0);
|
||||
int r = period.init(store->ctx(), store);
|
||||
if (r < 0) {
|
||||
if (store->is_meta_master()) {
|
||||
// can't pull if we're the master
|
||||
ldout(store->ctx(), 1) << "metadata master failed to read period "
|
||||
<< period_id << " from local storage: " << cpp_strerror(r) << dendl;
|
||||
return r;
|
||||
}
|
||||
ldout(store->ctx(), 14) << "pulling period " << period_id
|
||||
<< " from master" << dendl;
|
||||
// request the period from the master zone
|
||||
|
Loading…
Reference in New Issue
Block a user