Commit e5fd710
committed
Fix the long-blocking read for Valkey RDMA.
During the valkey benchmark, when we set the data size as 16KB, the
benchmark will be blocking on GET. The reason behind is that RDMA
event is edge triggered and every incoming data has to be read totally
instead of read partially. We modify the valkeyBufferRead to enable a
total read over the RDMA buffer when the conneciton type is RDMA. To
realize this logic we need to keep read the buffer until the read
result data size is smaller than the attempt read size.
In addition, we need to deal with a corner case for the logic above.
If the message happened to be 16KB and the first read finish all the
available data, the second read will be triggered and block there until
return an error. To solve this problem, we make read non-blocking
except for the first read.
Signed-off-by: Ruihong Wang <ruihong@google.com>1 parent af2e009 commit e5fd710
2 files changed
+44
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
515 | 520 | | |
516 | 521 | | |
517 | 522 | | |
| |||
531 | 536 | | |
532 | 537 | | |
533 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
534 | 542 | | |
535 | 543 | | |
536 | 544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
1012 | | - | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
1019 | 1047 | | |
1020 | 1048 | | |
1021 | 1049 | | |
| |||
0 commit comments