mirror of
https://github.com/ceph/ceph
synced 2025-02-19 17:08:05 +00:00
Merge pull request #17065 from tchaikov/wip-20785
mon/OSDMonitor: do not send_pg_creates with stale info Reviewed-by: Greg Farnum <gfarnum@redhat.com> Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
commit
c5ee5d1faa
@ -3261,6 +3261,13 @@ epoch_t OSDMonitor::send_pg_creates(int osd, Connection *con, epoch_t next) cons
|
||||
dout(30) << __func__ << " osd." << osd << " next=" << next
|
||||
<< " " << creating_pgs_by_osd_epoch << dendl;
|
||||
std::lock_guard<std::mutex> l(creating_pgs_lock);
|
||||
if (creating_pgs_epoch == 0 ||
|
||||
creating_pgs_epoch < mapping.get_epoch()) {
|
||||
dout(20) << __func__
|
||||
<< " not using stale creating_pgs@" << creating_pgs_epoch << dendl;
|
||||
// the subscribers will be updated when the mapping is completed anyway
|
||||
return next;
|
||||
}
|
||||
auto creating_pgs_by_epoch = creating_pgs_by_osd_epoch.find(osd);
|
||||
if (creating_pgs_by_epoch == creating_pgs_by_osd_epoch.end())
|
||||
return next;
|
||||
|
@ -243,7 +243,7 @@ private:
|
||||
mempool::osdmap_mapping::vector<
|
||||
mempool::osdmap_mapping::vector<pg_t>> acting_rmap; // osd -> pg
|
||||
//unused: mempool::osdmap_mapping::vector<std::vector<pg_t>> up_rmap; // osd -> pg
|
||||
epoch_t epoch;
|
||||
epoch_t epoch = 0;
|
||||
uint64_t num_pgs = 0;
|
||||
|
||||
void _init_mappings(const OSDMap& osdmap);
|
||||
|
Loading…
Reference in New Issue
Block a user