]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do not send peers really old maps 32000/head
authorSage Weil <sage@redhat.com>
Fri, 15 Feb 2019 14:43:23 +0000 (08:43 -0600)
committerNathan Cutler <ncutler@suse.com>
Wed, 4 Dec 2019 12:11:27 +0000 (13:11 +0100)
We may receive a message that sat in a queue for a while with a low
priority and is tagged with an older epoch.  Don't send a bunch of old
maps that we have already sent the peer.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit fa58979c2ddf2f4aa68386d04a2dddae0cf38c7a)

src/osd/OSD.cc

index 6b951fbf415475165c55e8bc88efa592234efd6c..2ead2ae068c934ffd3f2c151fad4493075aad70c 100644 (file)
@@ -6781,11 +6781,15 @@ void OSD::maybe_share_map(
   last_sent_epoch = session->last_sent_epoch;
   session->sent_epoch_lock.unlock();
 
+  // assume the peer has the newer of the op's sent_epoch and what
+  // we think we sent them.
+  epoch_t from = std::max(last_sent_epoch, op->sent_epoch);
+
   const Message *m = op->get_req();
   service.share_map(
     m->get_source(),
     m->get_connection().get(),
-    op->sent_epoch,
+    from,
     osdmap,
     session ? &last_sent_epoch : NULL);