]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/Protocol*: bump global_seq when retrying connection 25755/head
authorSage Weil <sage@redhat.com>
Mon, 7 Jan 2019 14:34:18 +0000 (08:34 -0600)
committerSage Weil <sage@redhat.com>
Thu, 10 Jan 2019 15:33:28 +0000 (09:33 -0600)
In the top connect retry in particular we do not bump connect_seq, so it
is critical that we bump global_seq so that the two connection attempts
are distinguishable at the peer.

Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/async/ProtocolV1.cc
src/msg/async/ProtocolV2.cc

index 0c2627b33782a438d38c2b548b7d8609dde0a08a..7ab46873a43bafd854127467a795e851f40a94e7 100644 (file)
@@ -199,6 +199,7 @@ void ProtocolV1::fault() {
         backoff.set_from_double(cct->_conf->ms_max_backoff);
     }
 
+    global_seq = messenger->get_global_seq();
     state = START_CONNECT;
     connection->state = AsyncConnection::STATE_CONNECTING;
     ldout(cct, 10) << __func__ << " waiting " << backoff << dendl;
@@ -214,6 +215,7 @@ void ProtocolV1::fault() {
     } else {
       ldout(cct, 0) << __func__ << " initiating reconnect" << dendl;
       connect_seq++;
+      global_seq = messenger->get_global_seq();
       state = START_CONNECT;
       connection->state = AsyncConnection::STATE_CONNECTING;
     }
index bfa08fc4038a2b7e2933cba9e1a35e35eda357a4..587f726f746661710667c0093decc1a59fe6d885 100644 (file)
@@ -196,6 +196,7 @@ void ProtocolV2::fault() {
         backoff.set_from_double(cct->_conf->ms_max_backoff);
     }
 
+    global_seq = messenger->get_global_seq();
     state = START_CONNECT;
     connection->state = AsyncConnection::STATE_CONNECTING;
     ldout(cct, 10) << __func__ << " waiting " << backoff << dendl;
@@ -211,6 +212,7 @@ void ProtocolV2::fault() {
     } else {
       ldout(cct, 0) << __func__ << " initiating reconnect" << dendl;
       connect_seq++;
+      global_seq = messenger->get_global_seq();
       state = START_CONNECT;
       connection->state = AsyncConnection::STATE_CONNECTING;
     }