]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix gc may cause a large number of read traffic 22941/head
authorliaoxin01 <liaoxin01@baidu.com>
Thu, 5 Jul 2018 06:23:34 +0000 (14:23 +0800)
committerJos Collin <jcollin@redhat.com>
Sun, 8 Jul 2018 23:27:49 +0000 (04:57 +0530)
fix http://tracker.ceph.com/issues/24767

Signed-off-by: Xin Liao <liaoxin01@baidu.com>
(cherry picked from commit afc3b1ab1f6b24267c5ab846e2e7a5de5ec9a5d0)

src/cls/rgw/cls_rgw.cc

index bb8876cf8a4fa620cb08c93714dfd09fcfae6bbe..ba2c3dad43de3acc5c80039b03aa95bf641f1385 100644 (file)
@@ -3333,8 +3333,11 @@ static int gc_iterate_entries(cls_method_context_t hctx, const string& marker, b
 
     CLS_LOG(10, "gc_iterate_entries key=%s\n", key.c_str());
 
-    if (!end_key.empty() && key.compare(end_key) >= 0)
+    if (!end_key.empty() && key.compare(end_key) >= 0) {
+      if (truncated)
+        *truncated = false;
       return 0;
+    }
 
     if (!key_in_index(key, GC_OBJ_TIME_INDEX))
       return 0;