From 91dd0c9787d1f5394f1926078ee98d50a5c1ae02 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 15 Jan 2019 11:29:34 -0600 Subject: [PATCH] mon/AuthMonitor: be more careful with max_global_id We're potentially handing out ids that haven't committed by increasing max_global_id before it commits. Signed-off-by: Sage Weil --- src/mon/AuthMonitor.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index f160eb852b5..852530a73a5 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -293,11 +293,10 @@ void AuthMonitor::increase_max_global_id() { ceph_assert(mon->is_leader()); - max_global_id += g_conf()->mon_globalid_prealloc; dout(10) << "increasing max_global_id to " << max_global_id << dendl; Incremental inc; inc.inc_type = GLOBAL_ID; - inc.max_global_id = max_global_id; + inc.max_global_id = max_global_id + g_conf()->mon_globalid_prealloc; pending_auth.push_back(inc); } -- 2.39.5