From: Tianshan Qu Date: Mon, 2 Jul 2018 17:49:14 +0000 (+0800) Subject: rgw: continue enoent index in dir_suggest X-Git-Tag: v13.2.2~90^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e0feb1aab63ea9212813d2cbafa0021a075fb30;p=ceph.git rgw: continue enoent index in dir_suggest since we do nothing to the not exists index, just continue to process other indexes and pass the test case Fixes: http://tracker.ceph.com/issues/24640 Signed-off-by: Tianshan Qu (cherry picked from commit d5d053ab3b8a6b8498e22b375fabe24bc988baf0) http://tracker.ceph.com/issues/24629 --- diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 87741a0a21ff..1a25d7ba3270 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -1914,9 +1914,13 @@ int rgw_dir_suggest_changes(cls_method_context_t hctx, string cur_change_key; encode_obj_index_key(cur_change.key, &cur_change_key); int ret = cls_cxx_map_get_val(hctx, cur_change_key, &cur_disk_bl); - if (ret < 0) + if (ret < 0 && ret != -ENOENT) return -EINVAL; + if (ret == -ENOENT) { + continue; + } + if (cur_disk_bl.length()) { bufferlist::iterator cur_disk_iter = cur_disk_bl.begin(); try {