From d5d053ab3b8a6b8498e22b375fabe24bc988baf0 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 --- 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 fb6b11277e37..c368d1b0b8dd 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -1912,9 +1912,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()) { auto cur_disk_iter = cur_disk_bl.cbegin(); try { -- 2.47.3