From: Abhishek Lekshmanan Date: Thu, 8 Mar 2018 12:55:00 +0000 (+0100) Subject: rgw: es module: set compression type correctly X-Git-Tag: v12.2.6~128^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ed70cd8ed040c7d8293f4cbc3f79095f3255e6c;p=ceph.git rgw: es module: set compression type correctly Parse compression type from the compression attr and only send this to ES. Fixes: http://tracker.ceph.com/issues/22758 Signed-off-by: Abhishek Lekshmanan (cherry picked from commit 5dc4655a4f14547410ee9c66ab32b0c943dc4753) Conflicts: src/rgw/rgw_sync_module_es.cc: Resolved in es_obj_metadata --- diff --git a/src/rgw/rgw_sync_module_es.cc b/src/rgw/rgw_sync_module_es.cc index 6c8c65c5a14c..0c30c91ed847 100644 --- a/src/rgw/rgw_sync_module_es.cc +++ b/src/rgw/rgw_sync_module_es.cc @@ -306,6 +306,11 @@ struct es_obj_metadata { } else if (name == "x-amz-tagging") { auto tags_bl = val.begin(); ::decode(obj_tags, tags_bl); + } else if (name == "compression") { + RGWCompressionInfo cs_info; + auto vals_bl = val.begin(); + decode(cs_info, vals_bl); + out_attrs[name] = cs_info.compression_type; } else { if (name != "pg_ver" && name != "source_zone" &&