rgw: Have an option to not to fetch bucket stats upon bucket listing

Fixes: http://tracker.ceph.com/issues/20377
Signed-off-by: Pavan Rallabhandi <PRallabhandi@walmartlabs.com>
This commit is contained in:
Pavan Rallabhandi 2017-06-22 13:29:16 +05:30
parent f337b4e75f
commit 80755e3396
2 changed files with 5 additions and 1 deletions

View 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

View 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;