]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: send MOSDPGNotify2 instead of MOSDPGNotify
authorKefu Chai <kchai@redhat.com>
Fri, 12 Mar 2021 07:09:12 +0000 (15:09 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 14 Mar 2021 14:46:51 +0000 (22:46 +0800)
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 <kchai@redhat.com>
src/osd/OSD.cc

index c3fa5b0544364f2aa4b95435eaca767df5d7e69a..a737b394a289ae7a1d2fca25b04f7f128400b270 100644 (file)
@@ -9516,15 +9516,13 @@ void OSD::handle_pg_query_nopg(const MQuery& q)
        osdmap->get_epoch(), empty,
        q.query.epoch_sent);
     } else {
-      vector<pg_notify_t> 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);