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(),
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:
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);
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) {
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 {