]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: continue enoent index in dir_suggest 22937/head
authorTianshan Qu <tianshan@xsky.com>
Mon, 2 Jul 2018 17:49:14 +0000 (01:49 +0800)
committerTianshan Qu <tianshan@xsky.com>
Sun, 8 Jul 2018 05:59:54 +0000 (13:59 +0800)
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 <tianshan@xsky.com>
src/cls/rgw/cls_rgw.cc

index fb6b11277e37b17918f870aa8cd403f2a38ff16a..c368d1b0b8dd68e854bbdb0007d70a685bb3d23d 100644 (file)
@@ -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 {