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

   ### What problem does this PR solve?
   
   Issue Number: Related to #3428
   
   Problem Summary:
   
   The normal process-exit path lacks a dedicated stop-and-join handler for URMA
   polling workers, while poller groups are stored in an ordinary static vector.
   Late Socket/UrmaEndpoint cleanup may enqueue CQ removal operations after the
   poller queues have been destroyed.
   
   ### What is changed and the side effects?
   
   Changed:
   
   - Keep the poller-group vector alive for the process lifetime using a leaky 
singleton.
   - Register a polling-only atexit handler to stop and join polling workers, 
preserving the existing IOBuf pool lifetime because thread-local blocks may 
outlive atexit handlers.
   - Skip CQ add/remove operations when the group is no longer running.
   - Add regression tests for polling shutdown and process exit.
   
   Validation (URMA mock):
   
   - CMake build passed with `WITH_URMA=ON` and `URMA_USE_MOCK=ON`.
   - All 20 tests passed.
   - An exit probe confirmed that polling workers completed their release 
callbacks before normal process exit.
   - `git diff --check` passed.
   
   Side effects:
   
   - Performance effects: adds a running-state check to CQ 
registration/removal; the CQ polling loop is unchanged.
   
   - Breaking backward compatibility: no wire protocol or existing function 
signature changes. The poller-group container is intentionally retained until 
process termination.
   
   ---
   ### 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