]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge PR #25754 into master
authorSage Weil <sage@redhat.com>
Mon, 14 Jan 2019 20:11:14 +0000 (14:11 -0600)
committerSage Weil <sage@redhat.com>
Mon, 14 Jan 2019 20:11:14 +0000 (14:11 -0600)
* refs/pull/25754/head:
msg/async/Protocol: send keepalive on connection race winner

Reviewed-by: Gregory Farnum <gfarnum@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
1  2 
src/msg/async/ProtocolV1.cc
src/msg/async/ProtocolV2.cc

index 57a3e7976b87450fdaccf0337feac815e4fb3f38,4b97158f1831f01cb3889a733ed6dfdfa81f7425..aba3eac080a4c70450cdf35c45f4da738d965ec9
@@@ -2098,9 -2097,13 +2099,13 @@@ CtPtr ProtocolV1::handle_connect_messag
              << __func__ << " accept connection race, existing " << existing
              << ".cseq " << exproto->connect_seq
              << " == " << connect_msg.connect_seq << ", sending WAIT" << dendl;
 -        ceph_assert(connection->peer_addrs.legacy_addr() >
 +        ceph_assert(connection->peer_addrs->legacy_addr() >
                      messenger->get_myaddr());
          existing->lock.unlock();
+       // make sure we follow through with opening the existing
+       // connection (if it isn't yet open) since we know the peer
+       // has something to send to us.
+       existing->send_keepalive();
          return send_connect_message_reply(CEPH_MSGR_TAG_WAIT, reply,
                                            authorizer_reply);
        }
index 798bd1633d377c7b44a3a1e803075603c91e2b25,b884203421da1dc52b66625efb5b1ecd1d23b635..19646d53ab9f304a5f9c0864ed1baa15ed90a240
@@@ -2146,10 -2145,14 +2147,14 @@@ CtPtr ProtocolV2::handle_connect_messag
              << __func__ << " accept connection race, existing " << existing
              << ".cseq " << exproto->connect_seq
              << " == " << connect_msg.connect_seq << ", sending WAIT" << dendl;
 -        ceph_assert(connection->peer_addrs.legacy_addr() >
 +        ceph_assert(connection->peer_addrs->legacy_addr() >
                      messenger->get_myaddr());
          existing->lock.unlock();
-         return send_connect_message_reply(CEPH_MSGR_TAG_WAIT, reply,
+       // make sure we follow through with opening the existing
+       // connection (if it isn't yet open) since we know the peer
+       // has something to send to us.
+       existing->send_keepalive();
+       return send_connect_message_reply(CEPH_MSGR_TAG_WAIT, reply,
                                            authorizer_reply);
        }
      }