-
Notifications
You must be signed in to change notification settings - Fork 729
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
RDMA: Fix dead loop when transfer large data (20KB) #1386
Conversation
@pizhenwei RDMA expert, please take a look. @fengquyoumo Thanks for your contribution. You need to commit with |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1386 +/- ##
============================================
+ Coverage 70.78% 70.83% +0.05%
============================================
Files 118 118
Lines 63497 63549 +52
============================================
+ Hits 44945 45014 +69
+ Misses 18552 18535 -17
|
Hi @fengquyoumo |
Signed-off-by: fengquyoumo <[email protected]>
3effb0c
to
e99df1e
Compare
@zuiderkwast :) Thanks for your help! |
Hi @fengquyoumo There is a lack of multi-threads support from RDMA. In general, you are right on this issue, but it's not valkey connection style. I suggest:
Please see
|
…pone_update_state and update_stat Signed-off-by: fengquyoumo <[email protected]>
@pizhenwei Thanks for your help! Please review the code again when you are free, Thanks! |
src/rdma.c
Outdated
typedef struct rdma_connection { | ||
connection c; | ||
int flags; |
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.
I guess
struct rdma_cm_id *cm_id;
int flags;
int last_errno;
would reduce 8 bytes.
Otherwise LGTM. I also test it locally, it works fine.
Hi @zuiderkwast , would you please take a look at this change?
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.
:) Thanks a lot for the detailed feedback!
…ory alignment Signed-off-by: fengquyoumo <[email protected]>
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.
LGTM.
Signed-off-by: fengquyoumo <[email protected]>
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.
Great. Thanks both of you for the fix and the review.
Determine the status of the Client when attempting to read data. If state=CLIENT_COMPLETED_IO, no read attempt is made and I/O operations on the Client are rescheduled by the main thread. > And 20474 Byte = PROTO_IOBUF_LEN(16KB) + SDS_HDR_VAR(16, s)(4090 Byte) Fixes valkey-io#1385 --------- Signed-off-by: fengquyoumo <[email protected]>
Determine the status of the Client when attempting to read data. If state=CLIENT_COMPLETED_IO, no read attempt is made and I/O operations on the Client are rescheduled by the main thread.
Fixes #1385