From: Yehuda Sadeh Date: Wed, 13 Apr 2016 23:05:09 +0000 (-0700) Subject: rgw: try to use current period id in a few more cases X-Git-Tag: v10.2.0~33^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bf299dce471ec69b8ef0d2832cbdcf91092611a4;p=ceph-ci.git rgw: try to use current period id in a few more cases If missing period id, try to use the current period id. This is needed for sync agent compatibility. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_rest_log.cc b/src/rgw/rgw_rest_log.cc index 854da2e0d6b..6f8bc644418 100644 --- a/src/rgw/rgw_rest_log.cc +++ b/src/rgw/rgw_rest_log.cc @@ -163,9 +163,14 @@ void RGWOp_MDLog_ShardInfo::execute() { } if (period.empty()) { - ldout(s->cct, 5) << "Missing period id" << dendl; - http_ret = -EINVAL; - return; + ldout(s->cct, 5) << "Missing period id trying to use current" << dendl; + period = store->get_current_period_id(); + + if (period.empty()) { + ldout(s->cct, 5) << "Missing period id" << dendl; + http_ret = -EINVAL; + return; + } } RGWMetadataLog meta_log{s->cct, store, period}; @@ -217,9 +222,14 @@ void RGWOp_MDLog_Delete::execute() { } if (period.empty()) { - ldout(s->cct, 5) << "Missing period id" << dendl; - http_ret = -EINVAL; - return; + ldout(s->cct, 5) << "Missing period id trying to use current" << dendl; + period = store->get_current_period_id(); + + if (period.empty()) { + ldout(s->cct, 5) << "Missing period id" << dendl; + http_ret = -EINVAL; + return; + } } RGWMetadataLog meta_log{s->cct, store, period};