summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2012-02-24 09:27:49 -0800
committerSage Weil <sage@newdream.net>2012-02-24 11:24:45 -0800
commitd3b203af16207797305e5306eafd572f0a0bc6a4 (patch)
treecc386eaa10b312995e0d3498aaf9790345f2c966
parent91fbc687ebc595aa376e4a378f72af183e8c7e91 (diff)
downloadceph-d3b203af16207797305e5306eafd572f0a0bc6a4.tar.gz
osd: add tunable for number of records in osd command replies
e.g., 'pg <pgid> list_missing [offset]'. Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r--src/common/config_opts.h1
-rw-r--r--src/osd/ReplicatedPG.cc2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h
index 6541656d8d8..942eae5cb31 100644
--- a/src/common/config_opts.h
+++ b/src/common/config_opts.h
@@ -299,6 +299,7 @@ OPTION(osd_max_notify_timeout, OPT_U32, 30) // max notify timeout in seconds
OPTION(osd_kill_backfill_at, OPT_INT, 0)
OPTION(osd_min_pg_log_entries, OPT_U32, 1000) // number of entries to keep in the pg log when trimming it
OPTION(osd_op_complaint_time, OPT_FLOAT, 30) // how many seconds old makes an op complaint-worthy
+OPTION(osd_command_max_records, OPT_INT, 256)
OPTION(filestore, OPT_BOOL, false)
OPTION(filestore_max_sync_interval, OPT_DOUBLE, 5) // seconds
OPTION(filestore_min_sync_interval, OPT_DOUBLE, .01) // seconds
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 929452d9f30..ed5660dfa08 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -340,7 +340,7 @@ int ReplicatedPG::do_command(vector<string>& cmd, ostream& ss,
uint32_t num = 0;
set<int> empty;
bufferlist bl;
- while (p != missing.missing.end() && num < 5) {
+ while (p != missing.missing.end() && num < g_conf->osd_command_max_records) {
jf.open_object_section("object");
jf.open_object_section("oid");
p->first.dump(&jf);