Skip to content

Commit

Permalink
rgw: es_obj_metadata encode instance "null" for none-version obj
Browse files Browse the repository at this point in the history
full-sync will get "null" for instance, but inc-sync will get
empty string, so keep the same

fixes: http://tracker.ceph.com/issues/23841

Signed-off-by: Shang Ding <dingshang@xsky.com>
(cherry picked from commit 0e965ad)
  • Loading branch information
Shang Ding authored and smithfarm committed Feb 11, 2019
1 parent f84b571 commit 19343d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rgw/rgw_sync_module_es.cc
Expand Up @@ -352,7 +352,10 @@ struct es_obj_metadata {
}
::encode_json("bucket", bucket_info.bucket.name, f);
::encode_json("name", key.name, f);
::encode_json("instance", key.instance, f);
string instance = key.instance;
if (instance.empty())
instance = "null";
::encode_json("instance", instance, f);
::encode_json("versioned_epoch", versioned_epoch, f);
::encode_json("owner", policy.get_owner(), f);
::encode_json("permissions", permissions, f);
Expand Down

0 comments on commit 19343d4

Please sign in to comment.