]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: add tunable for number of records in osd command replies
authorSage Weil <sage@newdream.net>
Fri, 24 Feb 2012 17:27:49 +0000 (09:27 -0800)
committerSage Weil <sage@newdream.net>
Fri, 24 Feb 2012 19:24:45 +0000 (11:24 -0800)
e.g., 'pg <pgid> list_missing [offset]'.

Signed-off-by: Sage Weil <sage@newdream.net>
src/common/config_opts.h
src/osd/ReplicatedPG.cc

index 6541656d8d8e45111810ffacd81bdf8abe40ec76..942eae5cb3160ed6a2af4e47b303e04b3ff241f4 100644 (file)
@@ -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
index 929452d9f30e16296a2e7cb42ec23e06c3ca6c8c..ed5660dfa0813370c0bef57dd1ad44e243cf81c3 100644 (file)
@@ -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);