mirror of
https://github.com/ceph/ceph
synced 2025-01-02 17:12:31 +00:00
osd: copy (don't move) pg list when sending beacon
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>
This commit is contained in:
parent
85470cd171
commit
f2f6e170de
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user