zhanghaou commented on PR #24745: URL: https://github.com/apache/pulsar/pull/24745#issuecomment-3310705383
> I saw this comment just now, it should be fine to wait for the JDK patch, so I dismissed my approval. Waiting for the JDK upgrade and using the latest version can indeed solve this problem, but wouldn't it be better if we could solve this issue without relying on a JDK upgrade? If the user doesn't know that they need to upgrade the JDK to a specified version, there will always be a risk of blocking. That's really scary! > Using a dedicated executor is reasonable. That's the purpose of this PR. > But the `ThreadPoolExecutor` based executor is not better than ForkJoinPool, which uses work-stealing and is leveraged by the implementation of virtual threads. A simple difference is that if a task takes too long to complete, the queued tasks in the same thread don't have a chance to execute. > > `ForkJoinPool` is a better choice for independent tasks like those tasks to avoid blocking Netty IO threads or the Metadata store thread in Pulsar. Use `ThreadPoolExecutor` based executor is refer to the existing code https://github.com/apache/pulsar/pull/22589 @BewareMyPower -- 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]
