From: Kefu Chai Date: Sat, 1 Aug 2020 16:28:36 +0000 (+0800) Subject: crimson/osd: send pg_stat with correct seq X-Git-Tag: wip-pdonnell-testing-20200918.022351~478^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6a20c7ffddc5e6fff1c4bd6296167c1962130d0f;p=ceph-ci.git crimson/osd: send pg_stat with correct seq * set the osd_stat in pg_stat message sent to mgr, otherwise the seq id in the message would be always 0. * return the seq id composed of up_epoch and osd_stat_seq when serving "flush_pg_stats" tell command. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index 0677825f15d..87409c242f7 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -704,7 +704,7 @@ MessageRef OSD::get_stats() const // todo: m-to-n: collect stats using map-reduce // MPGStats::had_map_for is not used since PGMonitor was removed auto m = make_message(monc->get_fsid(), osdmap->get_epoch()); - + m->osd_stat = osd_stat; for (auto [pgid, pg] : pg_map.get_pgs()) { if (pg->is_primary()) { auto stats = pg->get_stats(); @@ -720,7 +720,7 @@ uint64_t OSD::send_pg_stats() { // mgr client sends the report message in background mgrc->report(); - return osd_stat_seq; + return osd_stat.seq; } OSD::cached_map_t OSD::get_map() const