]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Have an option to not to fetch bucket stats upon bucket listing 15834/head
authorPavan Rallabhandi <PRallabhandi@walmartlabs.com>
Thu, 22 Jun 2017 07:59:16 +0000 (13:29 +0530)
committerPavan Rallabhandi <PRallabhandi@walmartlabs.com>
Tue, 27 Jun 2017 05:31:17 +0000 (11:01 +0530)
Fixes: http://tracker.ceph.com/issues/20377
Signed-off-by: Pavan Rallabhandi <PRallabhandi@walmartlabs.com>
src/common/config_opts.h
src/rgw/rgw_rest_swift.cc

index c9615c4a6509b96065660492116fcf7caefbdd4e..deac4df6a4b9c948c5316237257ad5771952d1d4 100644 (file)
@@ -1752,6 +1752,8 @@ OPTION(debug_deliberately_leak_memory, OPT_BOOL, false)
 
 OPTION(rgw_swift_custom_header, OPT_STR, "") // option to enable swift custom headers
 
+OPTION(rgw_swift_need_stats, OPT_BOOL, true) // option to enable stats on bucket listing for swift
+
 /* resharding tunables */
 OPTION(rgw_reshard_num_logs, OPT_INT, 16)
 OPTION(rgw_reshard_bucket_lock_duration, OPT_INT, 120) // duration of lock on bucket obj during resharding
index a3ccdca781a634bb58c2fa1d7ed52ec1e9db3636..a56b8a01de14d7811e4d06b6c51237a7afba848b 100644 (file)
@@ -54,7 +54,7 @@ int RGWListBuckets_ObjStore_SWIFT::get_params()
     limit = (uint64_t)l;
   }
 
-  if (need_stats) {
+  if (s->cct->_conf->rgw_swift_need_stats) {
     bool stats, exists;
     int r = s->info.args.get_bool("stats", &stats, &exists);
 
@@ -65,6 +65,8 @@ int RGWListBuckets_ObjStore_SWIFT::get_params()
     if (exists) {
       need_stats = stats;
     }
+  } else {
+    need_stats = false;
   }
 
   return 0;