]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix gc may cause a large number of read traffic 22863/head
authorliaoxin01 <liaoxin01@baidu.com>
Thu, 5 Jul 2018 06:23:34 +0000 (14:23 +0800)
committerliaoxin01 <liaoxin01@baidu.com>
Thu, 5 Jul 2018 06:24:21 +0000 (14:24 +0800)
fix http://tracker.ceph.com/issues/24767

Signed-off-by: Xin Liao <liaoxin01@baidu.com>
src/cls/rgw/cls_rgw.cc

index fb6b11277e37b17918f870aa8cd403f2a38ff16a..8748dbec7a6d98fdb53818a1d352188e446dd729 100644 (file)
@@ -3335,8 +3335,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;