]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: set global_seq when get from Messenger
authorYingxin Cheng <yingxin.cheng@intel.com>
Thu, 20 Oct 2022 02:56:16 +0000 (10:56 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Fri, 21 Oct 2022 09:51:29 +0000 (17:51 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/net/ProtocolV2.cc

index 7a4e3030f863211aef540f8fe14b5b57b29461d6..4df78bc2dcbc7b033dce1dee522eef81d7480a40 100644 (file)
@@ -1623,6 +1623,7 @@ ProtocolV2::send_server_ident()
 
   // refered to async-conn v2: not assign gs to global_seq
   return messenger.get_global_seq().then([this] (auto gs) {
+    global_seq = gs;
     logger().debug("{} UPDATE: gs={} for server ident", conn, global_seq);
 
     // this is required for the case when this connection is being replaced
@@ -1641,7 +1642,7 @@ ProtocolV2::send_server_ident()
     auto server_ident = ServerIdentFrame::Encode(
             messenger.get_myaddrs(),
             messenger.get_myname().num(),
-            gs,
+            global_seq,
             conn.policy.features_supported,
             conn.policy.features_required | msgr2_required,
             flags,
@@ -1651,7 +1652,7 @@ ProtocolV2::send_server_ident()
                    " gs={}, features_supported={}, features_required={},"
                    " flags={}, cookie={}",
                    conn, messenger.get_myaddrs(), messenger.get_myname().num(),
-                   gs, conn.policy.features_supported,
+                   global_seq, conn.policy.features_supported,
                    conn.policy.features_required | msgr2_required,
                    flags, server_cookie);