]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
AsyncConnection: Fix connection doesn't exchange in_seq problem
authorHaomai Wang <haomaiwang@gmail.com>
Thu, 30 Apr 2015 03:44:16 +0000 (11:44 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Thu, 30 Apr 2015 03:44:16 +0000 (11:44 +0800)
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 <haomaiwang@gmail.com>
src/msg/async/AsyncConnection.cc

index 4c72ae547aff9c7bbc5ef348d01e1bdbb9324e96..a401a8b51af52f043f8709dcc41e491c19729ff9 100644 (file)
@@ -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) {