bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

improve the monitor alibility of OrderedExecutor

Open leizhiyuan opened this issue 2 years ago • 2 comments

FEATURE REQUEST

  1. Please describe the feature you are requesting.

when we use OrderedExecutor, sometimes the task is slow, especially when we put the same ledgerId to one thread

now the timerRunnable will print

09:24:36.062 [bookkeeper-ml-scheduler-OrderedScheduler-6-0] WARN  org.apache.bookkeeper.common.util.OrderedExecutor - Runnable java.util.concurrent.CompletableFuture$UniAccept@1cb81e6c:class java.util.concurrent.CompletableFuture$UniAccept took too long 2056092 micros to execute.

it is not helpful for solving some problem

maybe we can start a monitor thread, when the time of one task exceeds threshold in the thread pool. we also printStackTrace , it will be very powerful

just like https://github.com/sofastack/sofa-common-tools/blob/master/src/main/java/com/alipay/sofa/common/thread/ThreadPoolMonitorRunner.java#L102

  1. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?

  2. Provide any additional detail on your proposed use case for this feature.

leizhiyuan avatar May 22 '22 13:05 leizhiyuan

I feel like I can use AOP to monitor timeout threads, but I need to spend time to understand how OrderedExecutor works, if need to implement development , please assign to me

azhsmesos avatar Sep 03 '22 07:09 azhsmesos

@azhsmesos Sorry for my late reply, assigned

shoothzj avatar Apr 16 '24 06:04 shoothzj