From 73ddcc374330a96f6b22d47c2d12b399638a7186 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 19 May 2017 15:17:18 -0400 Subject: [PATCH] mon/MgrStatMonitor: fix version across restarts Signed-off-by: Sage Weil --- src/mon/MgrStatMonitor.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mon/MgrStatMonitor.cc b/src/mon/MgrStatMonitor.cc index ef61c06346a..5392210f359 100644 --- a/src/mon/MgrStatMonitor.cc +++ b/src/mon/MgrStatMonitor.cc @@ -78,12 +78,14 @@ PGStatService *MgrStatMonitor::get_pg_stat_service() void MgrStatMonitor::create_initial() { + dout(10) << __func__ << dendl; version = 0; } void MgrStatMonitor::update_from_paxos(bool *need_bootstrap) { - version_t version = get_last_committed(); + version = get_last_committed(); + dout(10) << __func__ << " " << version << dendl; bufferlist bl; get_version(version, bl); if (version) { @@ -100,6 +102,7 @@ void MgrStatMonitor::update_from_paxos(bool *need_bootstrap) void MgrStatMonitor::create_pending() { + dout(10) << __func__ << " " << version << dendl; pending_digest = digest; pending_health_summary = health_summary; pending_health_detail = health_detail; -- 2.39.5