]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: es: use "null" as instance in case key.instance is empty
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 11 Apr 2017 15:45:48 +0000 (08:45 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 30 May 2017 20:26:54 +0000 (13:26 -0700)
when indexing objects. We can get either.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_sync_module_es.cc

index 6ceeab64d9debb51c5eb74de82020a0063389def..40459864c396ecc6edb75bc06c01c686d41ce94e 100644 (file)
@@ -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) {