diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2012-01-29 09:26:28 -0800 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2012-01-29 09:27:07 -0800 |
commit | 483c089c1bc035ddd26729bcb72d61f4a969f856 (patch) | |
tree | 555262f92b6766aac9b574895fde5dfbbde53f68 | |
parent | 9bb3875b1671b89a74895f3c97a27845867b3941 (diff) | |
download | ceph-483c089c1bc035ddd26729bcb72d61f4a969f856.tar.gz |
mon: trim old auth states
These aren't exposed outside the monitor, so we really only keep them
around to assist in mon recovery. Give ourselves a healthy margin over
the max join drift for that.
Fixes: #2000
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r-- | src/mon/AuthMonitor.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index ff475889cea..6cc002f8662 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -186,6 +186,11 @@ bool AuthMonitor::update_from_paxos() ::encode(mon->key_server, bl); paxos->stash_latest(paxosv, bl); + unsigned max = g_conf->paxos_max_join_drift * 2; + if (mon->is_leader() && + paxosv > max) + paxos->trim_to(paxosv - max); + return true; } |