RockteMQ-AI commented on issue #1422:
URL: 
https://github.com/apache/rocketmq-clients/issues/1422#issuecomment-6307750606

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   This is a valid bug in the Rust client's PushConsumer shutdown logic. The 
root cause analysis is thorough and accurate:
   
   **Root Causes:**
   1. Workers continue accepting new receive requests after `shutdown()` 
begins, with no flag to reject new work
   2. Actors are shut down sequentially (`await` each one) instead of in 
parallel, causing total shutdown time to be the sum of all actor shutdown times 
rather than the max
   
   **Impact:**
   - Shutdown takes 20-30s instead of ~5s in normal cases
   - In severe cases (stuck receive requests), shutdown can take minutes
   - In-flight requests are not properly cancelled during shutdown
   
   **Severity:** Medium-High — affects operational experience and graceful 
shutdown guarantees. While it doesn't cause data loss, it makes the client 
difficult to manage in production environments.
   
   **Dependency Note:** This bug is in code introduced by PRs #1404 and #1381 
(both currently open). The fix should either:
   1. Be incorporated into the respective PRs before merge, or
   2. Be addressed as follow-up PRs after they merge
   
   The proposed fixes are correct:
   1. Add a `shutting_down` flag to reject new receive requests after shutdown 
starts
   2. Use `join_all` or parallel shutdown for actors instead of sequential 
`await`
   3. Cancel in-flight receive requests when shutdown begins
   
   The Java client comparison is helpful — it shows the expected behavior 
pattern.
   
   ---
   *Automated evaluation by github-manager-bot*
   


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

Reply via email to