From: Kefu Chai Date: Fri, 12 Mar 2021 07:09:12 +0000 (+0800) Subject: osd: send MOSDPGNotify2 instead of MOSDPGNotify X-Git-Tag: v17.1.0~2622^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a142336afd0dba68f36c2333f81b16850b68d515;p=ceph.git osd: send MOSDPGNotify2 instead of MOSDPGNotify as we prefer sending MOSDPGNotify2 over MOSDPGNotify in PeeringState in post octopus, to be more consistent and have one less thing to worry, let's just use MOSDPGNotify2 in OSD.cc as well. Fixes: https://tracker.ceph.com/issues/49758 Signed-off-by: Kefu Chai --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index c3fa5b05443..a737b394a28 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -9516,15 +9516,13 @@ void OSD::handle_pg_query_nopg(const MQuery& q) osdmap->get_epoch(), empty, q.query.epoch_sent); } else { - vector ls; - ls.push_back( - pg_notify_t( - q.query.from, q.query.to, - q.query.epoch_sent, - osdmap->get_epoch(), - empty, - PastIntervals())); - m = new MOSDPGNotify(osdmap->get_epoch(), std::move(ls)); + pg_notify_t notify{q.query.from, q.query.to, + q.query.epoch_sent, + osdmap->get_epoch(), + empty, + PastIntervals()}; + m = new MOSDPGNotify2(spg_t{pgid.pgid, q.query.from}, + std::move(notify)); } service.maybe_share_map(con.get(), osdmap); con->send_message(m);