From: Sage Weil Date: Mon, 13 Oct 2008 19:50:06 +0000 (-0700) Subject: msgr: handle incoming lossy connection when outgoing policy is lossless X-Git-Tag: v0.5~338 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=72864d9eb8608423db849805d7bbd91d59d2ffd5;p=ceph.git msgr: handle incoming lossy connection when outgoing policy is lossless Basically, try to wake up our lossless connection. The lossy attempt never survives. This avoids worrying about keeping session state alive (connect_seq, etc.). --- diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index b244e3471d63..be9f23e6dd1f 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -873,6 +873,19 @@ int Rank::Pipe::accept() existing->was_session_reset(); goto replace; } + if (lossy_rx) { + if (existing->state == STATE_STANDBY) { + dout(-10) << "accept incoming lossy connection, kicking outgoing lossless" << dendl; + existing->state = STATE_CONNECTING; + existing->cond.Signal(); + } else { + dout(-10) << "accept incoming lossy connection, our lossless has state " << existing->state + << ", doing nothing" << dendl; + } + existing->lock.Unlock(); + rank.lock.Unlock(); + goto fail; + } if (connect.connect_seq < existing->connect_seq) { if (connect.connect_seq == 0) {