chenBright commented on code in PR #3137:
URL: https://github.com/apache/brpc/pull/3137#discussion_r2492631751


##########
src/brpc/rdma/rdma_endpoint.cpp:
##########
@@ -972,10 +1007,12 @@ 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
-                    || acks >= wnd_thresh) {
+            if (_pending_signaled_wrs.load(butil::memory_order_relaxed) <= 1 &&

Review Comment:
   When `_pending_signaled_wrs` is greater than 1, `_window_size` is not 
updated, and acks will be lost.



-- 
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