From: Tongliang Deng Date: Tue, 14 Dec 2021 02:32:31 +0000 (+0800) Subject: mon/OSDMonitor: fix incorrect op between osd state and weight X-Git-Tag: v17.1.0~176^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a3a1ba72d007090d078c3900ddef6f4cf8eff5f8;p=ceph.git 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 --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index b563e375092a..a2f8f174970c 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) {