]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "msg/async/Protocol*: send keep alive if existing wins" 26767/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 5 Mar 2019 11:46:09 +0000 (19:46 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 5 Mar 2019 12:02:23 +0000 (20:02 +0800)
This reverts commit 61b9432ef9a3847eceb96f8d5a854567c49bbf61.

If we are in the middle of replacing, we can not queue any further
write events into the old center because we may end up replacing
existing connection's center with a new one, and hence executing
the newly queued write events in the old thread.

See **transfer_existing** for a detailed description.

Also the patch does not make a lot of sense for the original issue
it tried to resolve, because **send_keepalive** is a pure noop if the
underlying connection is not ready, which is obviously true for the
case demonstrated in http://tracker.ceph.com/issues/38493..

Fixes: http://tracker.ceph.com/issues/38569
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/msg/async/ProtocolV1.cc
src/msg/async/ProtocolV2.cc

index a5cd40125d86b0daaec7d08dcaf5363396e17ec9..7fbd5c67c5896d5ee8385f3cdffc2b742fa0bc22 100644 (file)
@@ -2007,8 +2007,6 @@ CtPtr ProtocolV1::handle_connect_message_2() {
                     << " existing_state="
                     << connection->get_state_name(existing->state) << dendl;
       reply.global_seq = exproto->peer_global_seq;
-      // make sure we notice if existing connection is no longer functioning
-      existing->send_keepalive();
       existing->lock.unlock();
       return send_connect_message_reply(CEPH_MSGR_TAG_RETRY_GLOBAL, reply,
                                         authorizer_reply);
index b1215b7164fdacb4b840b7cf1f6f98a11ed30551..7481ab14c5d71d52ade35a27ea4f9d81e1ebc5a0 100644 (file)
@@ -2316,8 +2316,6 @@ CtPtr ProtocolV2::handle_reconnect(ceph::bufferlist &payload)
     ldout(cct, 1) << __func__
                   << " existing racing replace happened while replacing."
                   << " existing=" << existing << dendl;
-    // make sure we notice if existing connection is no longer functioning
-    existing->send_keepalive();
     auto retry = RetryGlobalFrame::Encode(session_stream_handlers,
                                           exproto->peer_global_seq);
     return WRITE(retry, "session retry", read_frame);
@@ -2425,8 +2423,6 @@ CtPtr ProtocolV2::handle_existing_connection(AsyncConnectionRef existing) {
     ldout(cct, 1) << __func__
                   << " existing racing replace happened while replacing."
                   << " existing=" << existing << dendl;
-    // make sure we notice if existing connection is no longer functioning
-    existing->send_keepalive();
     auto wait = WaitFrame::Encode(session_stream_handlers);
     return WRITE(wait, "wait", read_frame);
   }