diff options
author | Nitzan Mordechai <nmordech@redhat.com> | 2024-09-17 14:23:44 +0200 |
---|---|---|
committer | Nitzan Mordechai <nmordech@redhat.com> | 2024-09-17 14:26:57 +0200 |
commit | a8918f3594188fcca3ceeee2ac9f1df376d1772b (patch) | |
tree | ccef099deb070b1be04ae16389a07d4913e10f70 /src | |
parent | crimson/mgr/client: use gates to handle multi-shards (diff) | |
download | ceph-a8918f3594188fcca3ceeee2ac9f1df376d1772b.tar.xz ceph-a8918f3594188fcca3ceeee2ac9f1df376d1772b.zip |
crimson/mon/MonClient: use gates to handle multi-shards
Fixes: https://tracker.ceph.com/issues/67773
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | src/crimson/mon/MonClient.cc | 8 | ||||
-rw-r--r-- | src/crimson/mon/MonClient.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/crimson/mon/MonClient.cc b/src/crimson/mon/MonClient.cc index b4be4bba3fe..4919f0bf21f 100644 --- a/src/crimson/mon/MonClient.cc +++ b/src/crimson/mon/MonClient.cc @@ -464,7 +464,7 @@ seastar::future<> Client::load_keyring() void Client::tick() { - gate.dispatch_in_background(__func__, *this, [this] { + gates.dispatch_in_background(__func__, *this, [this] { if (active_con) { return seastar::when_all_succeed(wait_for_send_log(), active_con->get_conn()->send_keepalive(), @@ -505,7 +505,7 @@ std::optional<seastar::future<>> Client::ms_dispatch(crimson::net::ConnectionRef conn, MessageRef m) { bool dispatched = true; - gate.dispatch_in_background(__func__, *this, [this, conn, &m, &dispatched] { + gates.dispatch_in_background(__func__, *this, [this, conn, &m, &dispatched] { // we only care about these message types switch (m->get_type()) { case CEPH_MSG_MON_MAP: @@ -538,7 +538,7 @@ Client::ms_dispatch(crimson::net::ConnectionRef conn, MessageRef m) void Client::ms_handle_reset(crimson::net::ConnectionRef conn, bool /* is_replace */) { - gate.dispatch_in_background(__func__, *this, [this, conn] { + gates.dispatch_in_background(__func__, *this, [this, conn] { auto found = std::find_if(pending_conns.begin(), pending_conns.end(), [peer_addr = conn->get_peer_addr()](auto& mc) { return mc->is_my_peer(peer_addr); @@ -941,7 +941,7 @@ seastar::future<> Client::authenticate() seastar::future<> Client::stop() { logger().info("{}", __func__); - auto fut = gate.close(); + auto fut = gates.close_all(); timer.cancel(); ready_to_send = false; for (auto& pending_con : pending_conns) { diff --git a/src/crimson/mon/MonClient.h b/src/crimson/mon/MonClient.h index 1228ecd0bba..20c4d0ba1a1 100644 --- a/src/crimson/mon/MonClient.h +++ b/src/crimson/mon/MonClient.h @@ -194,7 +194,7 @@ private: std::vector<unsigned> get_random_mons(unsigned n) const; seastar::future<> _add_conn(unsigned rank, uint64_t global_id); void _finish_auth(const entity_addr_t& peer); - crimson::common::Gated gate; + crimson::common::gate_per_shard gates; // messages that are waiting for the active_con to be available struct pending_msg_t { |