BGQ99 commented on code in PR #3626:
URL: https://github.com/apache/brpc/pull/3626#discussion_r4334029973


##########
src/brpc/urma/urma_endpoint.cpp:
##########
@@ -952,6 +952,23 @@ ssize_t UrmaEndpoint::HandleCompletion(const urma_cr_t& 
cr) {
         uint16_t wnd = 1;  // We signal every WR (complete_enable=1).
         uint16_t old =
             _sq_window_size.load(butil::memory_order_relaxed);
+        if (old >= _local_window_capacity) {

Review Comment:
   Updated in 45a7cfb8. Kept the capacity check before buffer reclamation and 
replaced the subsequent CAS loop with fetch_add, preserving the memory barrier 
before credit publication.



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