]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: copy (don't move) pg list when sending beacon 29254/head
authorSage Weil <sage@redhat.com>
Fri, 14 Jun 2019 21:23:21 +0000 (16:23 -0500)
committerNathan Cutler <ncutler@suse.com>
Wed, 24 Jul 2019 11:05:13 +0000 (13:05 +0200)
If we move the list, then a second beacon sent before the pg list refreshes
will be empty.

Fixes: http://tracker.ceph.com/issues/40377
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit f2f6e170de100cb57d06e4b9a3dbba65530f745f)

src/osd/OSD.cc

index abfdde2f30ba579bcedeae498805a71b3070c6a0..b30e84a8fb29e7e6333fe7c4fa75e40fb5e2fd17 100644 (file)
@@ -6298,7 +6298,7 @@ void OSD::send_beacon(const ceph::coarse_mono_clock::time_point& now)
     {
       std::lock_guard l{min_last_epoch_clean_lock};
       beacon = new MOSDBeacon(osdmap->get_epoch(), min_last_epoch_clean);
-      std::swap(beacon->pgs, min_last_epoch_clean_pgs);
+      beacon->pgs = min_last_epoch_clean_pgs;
       last_sent_beacon = now;
     }
     monc->send_mon_message(beacon);