[Dubbo-8172]Not shuwdown ExecutorService when DefaultFuture. closeChannel() #8188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
消费者端ExecutorService在运行期间不应该shutdown
复现了 #8172 的的一种场景
1,启动3个提供者
2,启动1个消费者,开始服务调用(异步调用)
3,kill -9 提供者1,会发现消费者全局ExecutorService被CLOSE,后续服务调用使用SHARED_EXECUTOR
4,kill -9 提供者2,会发现SHARED_EXECUTOR被CLOSE
5,后续服务调用,报错及堆栈基本同issue描述
分析:提供者非正常下线(如netty先关闭,注册中心服务尚未下线),消费者端netty触发AbstractChannelHandlerDelegate.disconnected,从而触发futureExecutor.shutdownNow()。
而消费者端服务调用线程池是全局共享,在运行期间不应该被shutdown。
Brief changelog
DefaultFuture. closeChannel时,不关闭ExecutorService。
Checklist