chenBright commented on PR #3720:
URL: https://github.com/apache/brpc/pull/3720#issuecomment-6859114361

   @yanglimingcn Thanks for the detailed review. I checked all four findings 
against the latest local changes.
   
   1. **Deferred failures after Socket revival**
   
   Failure callbacks now capture a weak reference to the originating 
`SrqConnection`. Endpoint reset calls `Detach()` to invalidate that 
connection's notifications.
   
   The callback acquires a `SocketUniquePtr` before checking `detached()`, 
preserving the required ordering with health-check reset. A regression test 
pauses the notification, resets and revives the same SocketId, installs a new 
connection, and verifies that the old notification cannot fail it. The test 
also verifies that errors from the current connection still propagate.
   
   2. **Payload deleters blocking failure notifications**
   
   Payload release now runs in a separate task, and each Socket failure 
notification has its own task. This removes the sequential dependency between 
payload release and failure reporting, including dependencies between different 
Socket callbacks. Payload references are still released only after completion 
or safe DMA teardown.
   
   Added hardware-independent tests with controlled barriers between a payload 
deleter and a Socket failure callback, and between two Socket failure callbacks.
   
   One deliberate exception remains: if starting a bthread fails, the 
implementation logs the error and executes inline. Independent progress is 
therefore guaranteed on the normal scheduling path, while this exceptional 
fallback can still block progress.
   
   3. **Connection errors blocking the shared worker**
   
   Addressed locally. TX/RX errors publish a pending close request. 
`Progress()` uses the existing try-lock and unlock-notification protocol 
instead of blocking the worker on `_post_mutex`. Subsequent receives are 
rejected while close is pending, preventing later fragments from filling a gap 
left by discarded data.
   
   Fault-injection tests pause a sender while it holds the submission lock, 
inject TX, RX or asynchronous QP errors, and require a neighboring RPC to 
complete before releasing the sender. Worker-wide teardown still waits for 
in-flight submissions before reclaiming DMA resources.
   
   4. **Sleeping-writer wakeup coverage**
   
   Coverage has been strengthened, but the complete suggestion is not yet 
covered.
   
   The shared-CQ test now uses a blocked QP with no outstanding sends and 
checks its `_epollout_butex` notification before calling `IsWritable()` or 
retrying `Send()`. Capacity is returned by completions from other QPs.
   
   The test still explicitly resumes the paused CQ poller and does not exercise 
an actual sleeping Socket writer. A dedicated reservation-rollback wakeup test 
without an unrelated CQE is also still missing. Existing partial-post tests 
verify accounting, not that specific wakeup scenario.


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