Pre-check
- [x] I am sure that all the content I provide is in English.
Search before asking
- [x] I had searched in the issues and found no similar issues.
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
when i set threadPool with my custom threadPool . it may be executor reject exception when submit processTask in DefaultFuture.
The map of Futures cache may can not be clear for long time.
Is it necessary to try this kind of exception.
private static final Map<Long, DefaultFuture> FUTURES = new ConcurrentHashMap<>();
@Override
public void run(Timeout timeout) {
DefaultFuture future = DefaultFuture.getFuture(requestID);
if (future == null || future.isDone()) {
return;
}
ExecutorService executor = future.getExecutor();
if (executor != null && !executor.isShutdown()) {
executor.execute(() -> notifyTimeout(future));
} else {
notifyTimeout(future);
}
}
Steps to reproduce this issue
- set custom thread pool in consumer side
- set core thread and max thread and use limited queue
- when process task can not be processed the future remain in the memory
What you expected to happen
the dump of application, I use MAT to search futureMap. It keeps a future which associate with request send 3 hours ago.
Anything else
only when certain situation happened.
Are you willing to submit a pull request to fix on your own?
- [x] Yes I am willing to submit a pull request on my own!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct