From: Sage Weil Date: Wed, 23 Jan 2019 23:54:00 +0000 (-0600) Subject: msg/async/ProtocolV2: do not bump connect_seq for fault during ACCEPTING_SESSION X-Git-Tag: v14.1.0~271^2~14 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b2b123435f32338826afc4a662e64c29f1262f68;p=ceph-ci.git msg/async/ProtocolV2: do not bump connect_seq for fault during ACCEPTING_SESSION If we have a connection race, and we lose, we may end up with outgoing messages *and* be in ACCEPTING_SESSION. If we then fault, we want to leave connect_seq at 0 to avoid triggering a reset. Signed-off-by: Sage Weil --- diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index 0d542b35062..ec8e7e534b3 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -654,7 +654,10 @@ CtPtr ProtocolV2::_fault() { connection->write_lock.unlock(); - if (state != START_CONNECT && state != CONNECTING && state != WAIT) { + if (state != START_CONNECT && + state != CONNECTING && + state != WAIT && + state != ACCEPTING_SESSION /* due to connection race */) { // policy maybe empty when state is in accept if (connection->policy.server) { ldout(cct, 1) << __func__ << " server, going to standby" << dendl;