]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: continue enoent index in dir_suggest 23130/head
authorTianshan Qu <tianshan@xsky.com>
Mon, 2 Jul 2018 17:49:14 +0000 (01:49 +0800)
committerJ. Eric Ivancich <ivancich@redhat.com>
Tue, 24 Jul 2018 19:25:32 +0000 (15:25 -0400)
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>
(cherry picked from commit d5d053ab3b8a6b8498e22b375fabe24bc988baf0)

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

src/cls/rgw/cls_rgw.cc

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