From 1b9db0f95884df8868e6f98805496d3b877c9e6b Mon Sep 17 00:00:00 2001 From: Tianshan Qu Date: Tue, 3 Jul 2018 01:49:14 +0800 Subject: [PATCH] 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) fixes: http://tracker.ceph.com/issues/24628 --- src/cls/rgw/cls_rgw.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index a9fbfa6ab8ce7..d9784b79b5318 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -1902,9 +1902,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 { -- 2.39.5