]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: copy (don't move) pg list when sending beacon
authorSage Weil <sage@redhat.com>
Fri, 14 Jun 2019 21:23:21 +0000 (16:23 -0500)
committerSage Weil <sage@redhat.com>
Fri, 14 Jun 2019 21:23:21 +0000 (16:23 -0500)
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>
src/osd/OSD.cc

index ee32615c4092bd8e5e16f083fbea7ba761193d71..155ddd3b827ed600e108486f264d5dc97af3773b 100644 (file)
@@ -5825,7 +5825,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);