]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: copy (don't move) pg list when sending beacon 29253/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:04:42 +0000 (13:04 +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 2a2cee1121dca3703cccb8f461dde0290aa1d3a7..d22a9cb46d4f8319b6ad7994b4d15df65c667d89 100644 (file)
@@ -5646,7 +5646,7 @@ void OSD::send_beacon(const ceph::coarse_mono_clock::time_point& now)
     {
       Mutex::Locker 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);