chenBright opened a new pull request, #3425:
URL: https://github.com/apache/brpc/pull/3425

   ### What problem does this PR solve?
   
   Issue Number: resolve #3415
   
   Problem Summary:
   
   The completion notification requested by `ibv_req_notify_cq()` is one-shot: 
a CQE
   that is already in the CQ when the CQ is armed does NOT generate a new 
completion
   channel event. The standard pattern is therefore poll -> arm -> re-poll.
   
   `RdmaEndpoint::PollCq()` polls `recv_cq` first and switches to `send_cq` once
   `recv_cq` is empty. When both CQs are empty it arms them via
   `ReqNotifyCq(true)` / `ReqNotifyCq(false)`, but it keeps `send = true` and
   `cq = send_cq` afterwards, so only `send_cq` is re-polled. `recv_cq` is never
   re-polled although the comment right above claims it is.
   
   As a result, if a solicited recv CQE arrives in the race window between
   "poll `recv_cq` returns empty" and "arm `recv_cq`", the CQE is stranded in
   `recv_cq`: no new event is delivered and no re-poll picks it up. The received
   message is never handed to `ProcessNewMessage()`, and the connection stalls 
until
   an unrelated CQE happens to arrive, which shows up as RPC timeouts.
   
   ### What is changed and the side effects?
   
   Changed:
   
   Side effects:
   - Performance effects:
   
   - Breaking backward compatibility: 
   
   ---
   ### Check List:
   - Please make sure your changes are compilable.
   - When providing us with a new feature, it is best to add related tests.
   - Please follow [Contributor Covenant Code of 
Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).
   


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