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:
Vitaliy Filippov
2026-03-17 01:04:17 +03:00
parent fdea595913
commit 44c895dc30
4 changed files with 11 additions and 19 deletions
+4
View File
@@ -696,6 +696,10 @@ void osd_messenger_t::handle_rdma_events(msgr_rdma_context_t *rdma_context)
continue;
}
osd_client_t *cl = cl_it->second;
if (cl->peer_state == PEER_STOPPED)
{
continue;
}
auto rc = cl->rdma_conn;
if (wc[i].status != IBV_WC_SUCCESS)
{