diff --git a/src/rgw/rgw_period_history.cc b/src/rgw/rgw_period_history.cc index 895700f6897..1f0dbee1cd0 100644 --- a/src/rgw/rgw_period_history.cc +++ b/src/rgw/rgw_period_history.cc @@ -137,6 +137,8 @@ RGWPeriodHistory::Impl::Impl(CephContext* cct, Puller* puller, // get a cursor to the current period current_cursor = make_cursor(current_history, current_period.get_realm_epoch()); + } else { + current_history = histories.end(); } }