diff options
author | Sage Weil <sage@inktank.com> | 2013-07-04 14:21:04 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-04 17:09:13 -0700 |
commit | f3a51fa30e5ce1656853b40d831409f195f6e4ca (patch) | |
tree | 75e6cfbd9395253ab01c97bcb29e72a09e5c3bf2 | |
parent | 1156721f22f5f337241eef3d0276ca74fe6352d1 (diff) | |
download | ceph-f3a51fa30e5ce1656853b40d831409f195f6e4ca.tar.gz |
mon/Paxos: configure minimum paxos txns separately
We were using paxos_max_join_drift to control the minimum number of
paxos transactions to keep around. Instead, make this explicit, and
separate from the join drift.
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/common/config_opts.h | 1 | ||||
-rw-r--r-- | src/mon/Paxos.h | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h index b19d274eb2a..ac0e8624497 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -201,6 +201,7 @@ OPTION(paxos_stash_full_interval, OPT_INT, 25) // how often (in commits) to st OPTION(paxos_max_join_drift, OPT_INT, 10) // max paxos iterations before we must first sync the monitor stores OPTION(paxos_propose_interval, OPT_DOUBLE, 1.0) // gather updates for this long before proposing a map update OPTION(paxos_min_wait, OPT_DOUBLE, 0.05) // min time to gather updates for after period of inactivity +OPTION(paxos_min, OPT_INT, 500) // minimum number of paxos transactions to keep around OPTION(paxos_trim_min, OPT_INT, 500) // number of extra proposals tolerated before trimming OPTION(paxos_trim_max, OPT_INT, 1000) // max number of extra proposals to trim at a time OPTION(paxos_trim_disabled_max_versions, OPT_INT, 108000) // maximum amount of versions we shall allow passing by without trimming diff --git a/src/mon/Paxos.h b/src/mon/Paxos.h index 4f1af82836e..eeb1f34f198 100644 --- a/src/mon/Paxos.h +++ b/src/mon/Paxos.h @@ -1151,7 +1151,7 @@ public: */ void trim() { assert(should_trim()); - version_t trim_to_version = MIN(get_version() - g_conf->paxos_max_join_drift, + version_t trim_to_version = MIN(get_version() - g_conf->paxos_min, get_first_committed() + g_conf->paxos_trim_max); trim_to(trim_to_version); } @@ -1185,8 +1185,7 @@ public: */ bool should_trim() { int available_versions = (get_version() - get_first_committed()); - int maximum_versions = - (g_conf->paxos_max_join_drift + g_conf->paxos_trim_min); + int maximum_versions = (g_conf->paxos_min + g_conf->paxos_trim_min); if (going_to_trim || (available_versions <= maximum_versions)) return false; |