RainYuY commented on code in PR #15695:
URL: https://github.com/apache/dubbo/pull/15695#discussion_r2357204086
##########
dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/DefaultFuture.java:
##########
@@ -321,10 +322,13 @@ public void run(Timeout timeout) {
if (future == null || future.isDone()) {
return;
}
-
ExecutorService executor = future.getExecutor();
if (executor != null && !executor.isShutdown()) {
- executor.execute(() -> notifyTimeout(future));
+ try {
+ executor.execute(() -> notifyTimeout(future));
+ } catch (RejectedExecutionException e) {
+ notifyTimeout(future);
Review Comment:
Your first version of the code had the right idea, but it missed throwing
the RejectedExecutionException after the notifyTimeout call. Actually, we
should not call notifyTimeout here because this is not a timeout. You can fix
the notifyTimeout issue in this PR or in a follow-up PR, but for this PR please
revert to your original implementation and add the exception throw.
--
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]