]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: use make_message for creating message
authorKefu Chai <tchaikov@gmail.com>
Mon, 16 Sep 2019 18:04:56 +0000 (02:04 +0800)
committerKefu Chai <tchaikov@gmail.com>
Tue, 17 Sep 2019 17:07:54 +0000 (01:07 +0800)
more foolproof this way.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/crimson/osd/osd_operations/peering_event.cc

index 1d032f7f5a44dcbfc730fb21802b3c2b36c4679a..69d1f6b4404c579396881dee688bf503871020ab 100644 (file)
@@ -106,10 +106,10 @@ void RemotePeeringEvent::on_pg_absent()
     const pg_info_t empty{spg_t{pgid.pgid, q.query.to}};
     if (q.query.type == q.query.LOG ||
        q.query.type == q.query.FULLLOG)  {
-      auto m = new MOSDPGLog{q.query.from, q.query.to,
-                            map_epoch, empty,
-                            q.query.epoch_sent};
-      ctx.send_osd_message(q.from.osd, m);
+      auto m = ceph::make_message<MOSDPGLog>(q.query.from, q.query.to,
+                                            map_epoch, empty,
+                                            q.query.epoch_sent);
+      ctx.send_osd_message(q.from.osd, std::move(m));
     } else {
       ctx.send_notify(q.from.osd, {q.query.from, q.query.to,
                                   q.query.epoch_sent,