From 5e7d387caf0d0b9b518caead0c1b10b65624a490 Mon Sep 17 00:00:00 2001 From: Yingxin Cheng Date: Wed, 6 Mar 2019 17:59:52 +0800 Subject: [PATCH] crimson/net: add global_seq in ProtocolV2 Signed-off-by: Yingxin Cheng --- src/crimson/net/ProtocolV2.cc | 1 + src/crimson/net/ProtocolV2.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crimson/net/ProtocolV2.cc b/src/crimson/net/ProtocolV2.cc index 6e33929bbdc..7b95b2779a8 100644 --- a/src/crimson/net/ProtocolV2.cc +++ b/src/crimson/net/ProtocolV2.cc @@ -215,6 +215,7 @@ void ProtocolV2::execute_connecting() { trigger_state(state_t::CONNECTING, write_state_t::delay, true); seastar::with_gate(pending_dispatch, [this] { + global_seq = messenger.get_global_seq(); return Socket::connect(conn.peer_addr) .then([this](SocketFRef sock) { socket = std::move(sock); diff --git a/src/crimson/net/ProtocolV2.h b/src/crimson/net/ProtocolV2.h index 5fbb02cd663..3c761c9fa3c 100644 --- a/src/crimson/net/ProtocolV2.h +++ b/src/crimson/net/ProtocolV2.h @@ -61,7 +61,7 @@ class ProtocolV2 final : public Protocol { void trigger_state(state_t state, write_state_t write_state, bool reentrant); - // TODO: the rest of protocol data structures and variables. + uint64_t global_seq = 0; private: seastar::future<> fault(); -- 2.39.5