From 1ed70cd8ed040c7d8293f4cbc3f79095f3255e6c Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Thu, 8 Mar 2018 13:55:00 +0100 Subject: [PATCH] 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 --- src/rgw/rgw_sync_module_es.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rgw/rgw_sync_module_es.cc b/src/rgw/rgw_sync_module_es.cc index 6c8c65c5a14..0c30c91ed84 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" && -- 2.47.3