Fix clients possibly not destroyed after being switched to RDMA
It could in theory lead to hung operations on RDMA client disconnections. Workflow (probable): * OSD switches an outbound connection to PEER_RDMA and removes the FD from epoll * But a receive request in io_uring is still active * Receive response is never handled, refs remains > 0 * The connection is dropped, but osd_client_t is not destroyed because refs > 0 * Outbound ops are not canceled, suboperations hang, primary operations hang too
This commit is contained in:
@@ -739,14 +739,6 @@ void osd_messenger_t::check_peer_config(osd_client_t *cl)
|
||||
fprintf(stderr, "Connected to OSD %ju using RDMA\n", cl->osd_num);
|
||||
}
|
||||
cl->peer_state = PEER_RDMA;
|
||||
tfd->set_fd_handler(cl->peer_fd, false, [this](int peer_fd, int epoll_events)
|
||||
{
|
||||
// Do not miss the disconnection!
|
||||
if (epoll_events & EPOLLRDHUP)
|
||||
{
|
||||
handle_peer_epoll(peer_fd, epoll_events);
|
||||
}
|
||||
});
|
||||
// Add the initial receive request
|
||||
init_recv_rdma(cl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user