From: Haomai Wang Date: Thu, 30 Apr 2015 03:44:16 +0000 (+0800) Subject: AsyncConnection: Fix connection doesn't exchange in_seq problem X-Git-Tag: v9.0.1~29^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ae6247af8000c2ef914f43e1f3cefdf3035b7115;p=ceph.git AsyncConnection: Fix connection doesn't exchange in_seq problem 1. osd.a connect to osd.b and osd.b try to connect a 2. osd.b got WAIT then osd.b accpet connection from osd.a 2. osd.b inject error cause each side connection try to reconnect, connect_seq++ 3. osd.a try to reconnect 4. osd.b connect to osd.a and cause the new accept connection try to replace 5. osd.b's is_reset_from_peer=true 6. inject error to osd.b 7. osd.b connect to osd.a 8. successfully and is_reset_from_peer still is true 9. long time passed 10. error happen and osd.a connect to osd.b 11. because is_reset_from_peer is true, they don't exchange in_seq Signed-off-by: Haomai Wang --- diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index 4c72ae547aff..a401a8b51af5 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -2043,6 +2043,7 @@ void AsyncConnection::fault() recv_start = recv_end = 0; state_offset = 0; replacing = false; + is_reset_from_peer = false; outcoming_bl.clear(); if (!once_ready && !is_queued() && state >=STATE_ACCEPTING && state <= STATE_ACCEPTING_WAIT_CONNECT_MSG_AUTH) {