From: Yuri Weinstein Date: Thu, 28 Mar 2019 15:45:34 +0000 (-0700) Subject: Merge pull request #26358 from smithfarm/wip-37557-luminous X-Git-Tag: v12.2.12~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=82e3e96a9eae9ddf6f243dab81f858ee12222ff3;p=ceph.git Merge pull request #26358 from smithfarm/wip-37557-luminous luminous: multisite: es sync null versioned object failed because of olh info Reviewed-by: Abhishek Lekshmanan Reviewed-by: Casey Bodley --- 82e3e96a9eae9ddf6f243dab81f858ee12222ff3 diff --cc src/rgw/rgw_sync_module_es.cc index ccb688d7335,0bf2360bac2..b5be52413ba --- a/src/rgw/rgw_sync_module_es.cc +++ b/src/rgw/rgw_sync_module_es.cc @@@ -454,9 -286,9 +454,9 @@@ struct es_obj_metadata continue; } - if (attr_name.compare(0, sizeof(RGW_ATTR_META_PREFIX) - 1, RGW_ATTR_META_PREFIX) == 0) { + if (boost::algorithm::starts_with(attr_name, RGW_ATTR_META_PREFIX)) { custom_meta.emplace(attr_name.substr(sizeof(RGW_ATTR_META_PREFIX) - 1), - string(val.c_str(), (val.length() > 0 ? val.length() - 1 : 0))); + string(val.c_str(), attr_len(val))); continue; }