From: Yehuda Sadeh Date: Tue, 11 Apr 2017 15:45:48 +0000 (-0700) Subject: rgw: es: use "null" as instance in case key.instance is empty X-Git-Tag: ses5-milestone6~9^2~3^2~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a680aa11a318813070a557e1645c1b1c97eda66f;p=ceph.git rgw: es: use "null" as instance in case key.instance is empty when indexing objects. We can get either. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_sync_module_es.cc b/src/rgw/rgw_sync_module_es.cc index 6ceeab64d9de..40459864c396 100644 --- a/src/rgw/rgw_sync_module_es.cc +++ b/src/rgw/rgw_sync_module_es.cc @@ -148,7 +148,7 @@ struct ElasticConfig { } string get_obj_path(const RGWBucketInfo& bucket_info, const rgw_obj_key& key) { - return index_path + "/object/" + bucket_info.bucket.bucket_id + ":" + key.name + ":" + key.instance; + return index_path + "/object/" + bucket_info.bucket.bucket_id + ":" + key.name + ":" + (key.instance.empty() ? "null" : key.instance); } bool should_handle_operation(RGWBucketInfo& bucket_info) {