From b2b123435f32338826afc4a662e64c29f1262f68 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 23 Jan 2019 17:54:00 -0600 Subject: [PATCH] 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 --- src/msg/async/ProtocolV2.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.5