From 232ac1a52a322d163d8d8dbc4a7da4b6a9acb709 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Fri, 4 Apr 2014 16:06:05 -0700 Subject: [PATCH] OSD: _share_map_outgoing whenever sending a message to a peer This ensures that they get new maps before an op which requires them (that they would then request from the monitor). Signed-off-by: Greg Farnum --- src/osd/OSD.cc | 5 ++++- src/osd/OSD.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 52c4f4575022e..47cafaa8d39ab 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3852,7 +3852,10 @@ void OSDService::send_message_osd_cluster(int peer, Message *m, epoch_t from_epo m->put(); return; } - osd->cluster_messenger->send_message(m, next_osdmap->get_cluster_inst(peer)); + const entity_inst_t& peer_inst = next_osdmap->get_cluster_inst(peer); + Connection *peer_con = osd->cluster_messenger->get_connection(peer_inst).get(); + osd->_share_map_outgoing(peer, peer_con, next_osdmap); + osd->cluster_messenger->send_message(m, peer_inst); } ConnectionRef OSDService::get_con_osd_cluster(int peer, epoch_t from_epoch) diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 9192fcc8069a0..6b3c89d9ce5d5 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -334,7 +334,7 @@ public: void dequeue_pg(PG *pg, list *dequeued); // -- superblock -- - Mutex publish_lock, pre_publish_lock; + Mutex publish_lock, pre_publish_lock; // pre-publish orders before publish OSDSuperblock superblock; OSDSuperblock get_superblock() { Mutex::Locker l(publish_lock); -- 2.39.5