yanglimingcn commented on code in PR #3145:
URL: https://github.com/apache/brpc/pull/3145#discussion_r2508547135


##########
src/brpc/rdma/rdma_endpoint.cpp:
##########
@@ -972,9 +1001,9 @@ ssize_t RdmaEndpoint::HandleCompletion(ibv_wc& wc) {
 
             // Update window
             uint32_t wnd_thresh = _local_window_capacity / 8;
-            if (_window_size.fetch_add(acks, butil::memory_order_relaxed) >= 
wnd_thresh
+            if (_remote_rq_window_size.fetch_add(acks, 
butil::memory_order_relaxed) >= wnd_thresh

Review Comment:
   The meaning of `_remote_rq_window_size` is not entirely clear. On the 
receiving end, `SendAck` means informing the sending end that data reception is 
complete.
   
   The sending end can now clear `snd_buffer`. The original logic assumed that 
clearing `snd_buffer` would free up space for `sqe`, but in reality, even if 
`snd_buffer` is cleared, space may not necessarily be freed up for `sqe`, 
causing the problem.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to