From: Casey Bodley Date: Mon, 2 Dec 2019 21:59:05 +0000 (-0500) Subject: rgw: apply_olh_log ignores RGW_ATTR_OLH_VER decode error X-Git-Tag: v14.2.8~78^2~18^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=96fe1c9eaf13b09336dd2bbbf4805e6ee5cbccb2;p=ceph.git rgw: apply_olh_log ignores RGW_ATTR_OLH_VER decode error this resolves test failures that return 400 Bad Request after: apply_olh_log failed to decode olh ver '' because olh_init_modification_impl() is writing an empty attribute: bufferlist verbl; op.setxattr(RGW_ATTR_OLH_VER, verbl); on such decode errors, link_epoch will be set to 0, and will correctly be overwritten by real epochs from the olh log Fixes: https://tracker.ceph.com/issues/39142 Signed-off-by: Casey Bodley (cherry picked from commit 36c54a601c62894d0dccec49322cf7ea6bbb7d02) --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index be37116c32f6..d48f59321e6b 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -7493,10 +7493,6 @@ int RGWRados::apply_olh_log(RGWObjectCtx& obj_ctx, RGWObjState& state, const RGW std::string str = olh_ver->second.to_str(); std::string err; link_epoch = strict_strtoll(str.c_str(), 10, &err); - if (!err.empty()) { - ldout(cct, 0) << "apply_olh_log failed to decode olh ver '" << str << "'" << dendl; - return -EINVAL; - } } auto olh_info = state.attrset.find(RGW_ATTR_OLH_INFO); if (olh_info != state.attrset.end()) {