summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-10-08 14:32:37 -0700
committerYehuda Sadeh <yehuda@inktank.com>2013-10-10 13:51:23 -0700
commit34d05262e523e65b32a0771b76e777a1f2798f8f (patch)
tree0a8c501509be5edbe905f2c8f718cdb776d6bd93
parentfc358077686b1cc4044a3adfc61757a63d816e76 (diff)
downloadceph-34d05262e523e65b32a0771b76e777a1f2798f8f.tar.gz
rgw: configurable bucket quota size
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/common/config_opts.h1
-rw-r--r--src/rgw/rgw_quota.cc3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h
index 9dbff06f4c4..c2784ce287e 100644
--- a/src/common/config_opts.h
+++ b/src/common/config_opts.h
@@ -716,6 +716,7 @@ OPTION(rgw_data_log_obj_prefix, OPT_STR, "data_log") //
OPTION(rgw_replica_log_obj_prefix, OPT_STR, "replica_log") //
OPTION(rgw_bucket_quota_ttl, OPT_INT, 600) // time for cached bucket stats to be cached within rgw instance
+OPTION(rgw_bucket_quota_cache_size, OPT_INT, 10000) // number of entries in bucket quota cache
OPTION(mutex_perf_counter, OPT_BOOL, false) // enable/disable mutex perf counter
diff --git a/src/rgw/rgw_quota.cc b/src/rgw/rgw_quota.cc
index 11da4bf0177..9380403c7bc 100644
--- a/src/rgw/rgw_quota.cc
+++ b/src/rgw/rgw_quota.cc
@@ -24,8 +24,7 @@ class RGWBucketStatsCache {
int fetch_bucket_totals(rgw_bucket& bucket, RGWBucketStats& stats);
public:
-#warning FIXME configurable stats_map size
- RGWBucketStatsCache(RGWRados *_store) : store(_store), stats_map(10000) {
+ RGWBucketStatsCache(RGWRados *_store) : store(_store), stats_map(store->ctx()->_conf->rgw_bucket_quota_cache_size) {
async_refcount = new RefCountedWaitObject;
}
~RGWBucketStatsCache() {