]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
AsyncConnection: handle socket error ASAP
authorHaomai Wang <haomaiwang@gmail.com>
Thu, 12 Mar 2015 10:13:49 +0000 (18:13 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Thu, 12 Mar 2015 10:13:49 +0000 (18:13 +0800)
1. client try to connect to server
2. server side accept and enter STANDBY because of socket error
3. client reconnect
4. during replacing, server side failed to reply connect tag
5. client reconnect again
6. because we have existing connection which is in normal state but has
error socket, we will reply to WAIT tag
7. client waits

We need to handle error in step 4, so we can ensure not sending WAIT tag

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/msg/async/AsyncConnection.cc

index ec3e2bd976283018c081e698a72723fa8c8f7113..9efcf065ff61bdeb1beff0a0d328658c78af5c01 100644 (file)
@@ -1752,7 +1752,7 @@ int AsyncConnection::handle_connect_msg(ceph_msg_connect &connect, bufferlist &a
 
     if (existing->_reply_accept(CEPH_MSGR_TAG_RETRY_GLOBAL, connect, reply, authorizer_reply) < 0) {
       // handle error
-      existing->center->dispatch_event_external(existing->write_handler);
+      existing->fault();
     }
 
     _stop();