From a3a1ba72d007090d078c3900ddef6f4cf8eff5f8 Mon Sep 17 00:00:00 2001 From: Tongliang Deng Date: Tue, 14 Dec 2021 10:32:31 +0800 Subject: [PATCH] mon/OSDMonitor: fix incorrect op between osd state and weight The cleanup in f994925908c720f8e0b3fda2f1fc51ef6e757de3 removes osd_epochs if osd is marked out, but out status is not stored in new_state, it is in new_weight. The osd_epochs of osd marked out are handled properly in 0ecef75210113ffba1b89c061cd470ee321d7a45. Thus we delete it. Signed-off-by: Tongliang Deng --- src/mon/OSDMonitor.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index b563e375092..a2f8f174970 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -894,10 +894,6 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap) // could be marked up *or* down, but we're too lazy to check which last_osd_report.erase(osd); } - if (state & CEPH_OSD_OUT) { - // could be marked in *or* out, but we can safely drop it - osd_epochs.erase(osd); - } } for (const auto [osd, weight] : inc.new_weight) { if (weight == CEPH_OSD_OUT) { -- 2.39.5