From 9844885d4c793514132ef35a60fcc1b3ea6b4c34 Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Mon, 23 Jun 2014 19:24:55 +0100 Subject: [PATCH] mon: DataHealthService: s/mon_leveldb_size_warn/mon_data_size_warn/ Make the option name independent from the store mechanism used underneath. Signed-off-by: Joao Eduardo Luis --- src/common/config_opts.h | 2 +- src/mon/DataHealthService.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index d003c4b948d29..4323a7b104ff1 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -191,6 +191,7 @@ OPTION(mon_max_log_entries_per_event, OPT_INT, 4096) OPTION(mon_health_data_update_interval, OPT_FLOAT, 60.0) OPTION(mon_data_avail_crit, OPT_INT, 5) OPTION(mon_data_avail_warn, OPT_INT, 30) +OPTION(mon_data_size_warn, OPT_U64, 15*1024*1024*1024) // issue a warning when the monitor's data store goes over 15GB (in bytes) OPTION(mon_config_key_max_entry_size, OPT_INT, 4096) // max num bytes per config-key entry OPTION(mon_sync_timeout, OPT_DOUBLE, 60.0) OPTION(mon_sync_max_payload_size, OPT_U32, 1048576) // max size for a sync chunk payload (say, 1MB) @@ -219,7 +220,6 @@ OPTION(mon_leveldb_max_open_files, OPT_INT, 0) // monitor's leveldb max open fil OPTION(mon_leveldb_compression, OPT_BOOL, false) // monitor's leveldb uses compression OPTION(mon_leveldb_paranoid, OPT_BOOL, false) // monitor's leveldb paranoid flag OPTION(mon_leveldb_log, OPT_STR, "") -OPTION(mon_leveldb_size_warn, OPT_U64, 40*1024*1024*1024) // issue a warning when the monitor's leveldb goes over 40GB (in bytes) OPTION(mon_force_quorum_join, OPT_BOOL, false) // force monitor to join quorum even if it has been previously removed from the map OPTION(paxos_stash_full_interval, OPT_INT, 25) // how often (in commits) to stash a full copy of the PaxosService state OPTION(paxos_max_join_drift, OPT_INT, 10) // max paxos iterations before we must first sync the monitor stores diff --git a/src/mon/DataHealthService.cc b/src/mon/DataHealthService.cc index bbe98e1485a6b..44f176a96a65c 100644 --- a/src/mon/DataHealthService.cc +++ b/src/mon/DataHealthService.cc @@ -95,7 +95,7 @@ health_status_t DataHealthService::get_health( health_detail = "low disk space!"; } - if (stats.store_stats.bytes_total >= g_conf->mon_leveldb_size_warn) { + if (stats.store_stats.bytes_total >= g_conf->mon_data_size_warn) { if (health_status > HEALTH_WARN) health_status = HEALTH_WARN; if (!health_detail.empty()) @@ -103,7 +103,7 @@ health_status_t DataHealthService::get_health( stringstream ss; ss << "store is getting too big! " << prettybyte_t(stats.store_stats.bytes_total) - << " >= " << prettybyte_t(g_conf->mon_leveldb_size_warn); + << " >= " << prettybyte_t(g_conf->mon_data_size_warn); health_detail.append(ss.str()); } -- 2.39.5