]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/config: change type of osd_mon_ack_timeout from int to double 10526/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 1 Aug 2016 08:51:38 +0000 (16:51 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 1 Aug 2016 22:54:57 +0000 (06:54 +0800)
We may use osd_mon_ack_timeout the following way:
  double backoff = stats_ack_timeout / g_conf->osd_mon_ack_timeout;
which is at risk of precision lost.

Example:

main()
{
  double r = 5 / 30;
  cout << "r = " << r << std::endl;
}

Output:
  r = 0

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/common/config_opts.h

index 1bc1fbb70ea3d1c7c19435ef78c8c85bc9aef460..469eec64e4a58c233c8e6549004e9be90a0890fe 100644 (file)
@@ -744,7 +744,7 @@ OPTION(osd_mon_report_interval_max, OPT_INT, 600)
 OPTION(osd_mon_report_interval_min, OPT_INT, 5)  // pg stats, failures, up_thru, boot.
 OPTION(osd_mon_report_max_in_flight, OPT_INT, 2)  // max updates in flight
 OPTION(osd_pg_stat_report_interval_max, OPT_INT, 500)  // report pg stats for any given pg at least this often
-OPTION(osd_mon_ack_timeout, OPT_INT, 30) // time out a mon if it doesn't ack stats
+OPTION(osd_mon_ack_timeout, OPT_DOUBLE, 30.0) // time out a mon if it doesn't ack stats
 OPTION(osd_stats_ack_timeout_factor, OPT_DOUBLE, 2.0) // multiples of mon_ack_timeout
 OPTION(osd_stats_ack_timeout_decay, OPT_DOUBLE, .9)
 OPTION(osd_default_data_pool_replay_window, OPT_INT, 45)