RockteMQ-AI commented on issue #10739:
URL: https://github.com/apache/rocketmq/issues/10739#issuecomment-5150949728

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase at 
`00e45b8a6d`.
   
   **Root Cause:** `FutureUtils.appendNextFuture` calls 
`future.whenCompleteAsync(callback, executor)` but ignores the returned 
`CompletableFuture<Void>`. If the executor rejects the completion task (e.g., 
after shutdown or under saturation), the dependent stage completes 
exceptionally but the manually created `nextFuture` is never completed — 
leaving callers with a permanently pending future.
   
   **Compounding Factor:** The default `ThreadPoolMonitor.createAndMonitor` 
overload uses `DiscardOldestPolicy` as the rejection handler (line 110). After 
shutdown, it silently discards the completion task without throwing 
`RejectedExecutionException`, so `FutureUtils` has no rejection signal to 
propagate.
   
   **Impact:** `FutureUtils.addExecutor` is used in 20+ call sites across 
`ProducerProcessor` and `ConsumerProcessor`. During processor-pool shutdown or 
saturation, gRPC/remoting request futures can remain pending indefinitely until 
an outer timeout or connection teardown.
   
   **Severity:** High — affects Proxy request path reliability during 
shutdown/saturation scenarios.
   
   **Affected code:**
   - `common/src/main/java/org/apache/rocketmq/common/utils/FutureUtils.java` — 
`appendNextFuture` method
   - 
`common/src/main/java/org/apache/rocketmq/common/thread/ThreadPoolMonitor.java` 
— default `DiscardOldestPolicy`
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *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