From: Sage Weil Date: Mon, 7 Jan 2019 14:34:18 +0000 (-0600) Subject: msg/async/Protocol*: bump global_seq when retrying connection X-Git-Tag: v14.1.0~434^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=39e8de2d72e2541323f8ed9d8b68075fcbd02701;p=ceph.git msg/async/Protocol*: bump global_seq when retrying connection 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 --- diff --git a/src/msg/async/ProtocolV1.cc b/src/msg/async/ProtocolV1.cc index 0c2627b33782..7ab46873a43b 100644 --- a/src/msg/async/ProtocolV1.cc +++ b/src/msg/async/ProtocolV1.cc @@ -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; } diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index bfa08fc4038a..587f726f7466 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -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; }