New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimization for connection establishment. #16006
Conversation
Signed-off-by: shangfufei <shangfufei@inspur.com>
} else { // ack from client | ||
connected = 1; | ||
cleanup(); | ||
ldout(cct, 10) << __func__ << " handshake of rdma is done. server connected: " << connected << dendl; | ||
//cleanup(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why comment cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this modification is to slove the problem that there will be a lot of CLOSE_WAIT when CEPH is running. @yuyuyu101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not cleanup, it will leak socket... CLOSE_WAIT is just ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi, after comment cleanup, we add a way to disconnect the connection in handle_connection() to avoid socket leakage, as follows:
if (1 == connected) {
ldout(cct, 1) << func << " warnning: logic failed: read len: " << r << dendl;
fault();
return;
}
@yuyuyu101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we detect rdma connection closed via 0 length rdma msg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about the physical disconnection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will handle by async connection timeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
connnection may not be built successfully after making tcp_fd closed in cleanup().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuyuyu101
hi~
Commenting cleanup() will avoid CLOSE_WAIT of server, after comment cleanup, we add a way to disconnect the connection in handle_connection() to avoid socket leakage, as follows:
if (1 == connected) {
ldout(cct, 1) << func << " warnning: logic failed: read len: " << r << dendl;
fault();
return;
}
Thanks
liujiebj <notifications@github.com>于2017年7月13日 周四10:48写道:
***@***.**** commented on this pull request.
------------------------------
In src/msg/async/rdma/RDMAConnectedSocketImpl.cc
<#16006 (comment)>:
> } else { // ack from client
connected = 1;
- cleanup();
+ ldout(cct, 10) << __func__ << " handshake of rdma is done. server connected: " << connected << dendl;
+ //cleanup();
connnection may not be built successfully after making tcp_fd closed in
cleanup().
it's ok
AsyncConnection will cleanup socket
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16006 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA72YeUy0ub0pMdXpwI0wqNjKVtqce_Iks5sNZONgaJpZM4OJCla>
.
--
Best Regards,
Wheat
|
looks ok, need test |
I am confused that how can I add labels to the pull request. Do I have the permission ? Please help @tchaikov |
tested |
Under the mode of RDMA communication, this modification can improve the efficiency of establishing connections and improve the success rate of connection establishment.
Signed-off-by: shangfufei shangfufei@inspur.com