]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
AsyncConnection: Discard all prefetch buffer when replacing 4311/head
authorHaomai Wang <haomaiwang@gmail.com>
Sun, 12 Apr 2015 07:01:50 +0000 (15:01 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Sun, 12 Apr 2015 07:01:50 +0000 (15:01 +0800)
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/msg/async/AsyncConnection.cc

index fdc94a06d395d7d505105d4f32558c86f8079ba0..06a2d9a03bba7a7883ca8ded8f7549d2bd25288d 100644 (file)
@@ -1752,7 +1752,9 @@ int AsyncConnection::handle_connect_msg(ceph_msg_connect &connect, bufferlist &a
     existing->replacing = true;
     existing->state_offset = 0;
     existing->state = STATE_ACCEPTING_WAIT_CONNECT_MSG;
-    // there should exist any buffer
+    // Discard existing prefetch buffer in `recv_buf`
+    existing->recv_start = existing->recv_end = 0;
+    // there shouldn't exist any buffer
     assert(recv_start == recv_end);
 
     if (existing->_reply_accept(CEPH_MSGR_TAG_RETRY_GLOBAL, connect, reply, authorizer_reply) < 0) {