Agree +1.

I remember I mentioned this idea before
https://lists.apache.org/thread/qwcxrr7o29q66dgs4lqkk1nvvvhbjl2s

FYI: 
https://github.com/eclipse-vertx/vert.x/blob/d711e50174f84a06744c855dd29222beaa97bdeb/src/main/java/io/vertx/core/impl/btc/BlockedThreadChecker.java

IMO, we can use one proposal to tidy up the thread pool usage that includes
the following steps:

1. Collect and normalise the use of thread pools.
2. Introduce the block thread checker to check blocking calls. Set default 
enable=false.
3. Introduce the thread auto switcher to avoid sensitive threads(zk thread) 
running unrelated tasks in the CompletableFuture invoke chain.
4. Test and fix all of the blocking behaviour.
5. set default enable=true.


Best
Mattison
On Dec 19, 2022, 20:17 +0800, adobewjl <wjl_is_...@163.com>, wrote:
> Hello pulsar community,
> I've opened `PIP-232: Introduce thread monitor to check if thread is blocked 
> for long time.` to discuss.
> For more details, please read the PIP at 
> https://github.com/apache/pulsar/issues/18985
> I'm looking forward to hearing what you think.
> Also the demo PR link at https://github.com/apache/pulsar/pull/18958

Reply via email to