apache / apache/bookkeeper

improve the monitor alibility of OrderedExecutor

Open
#3,286 2 comments 0 reactions 1 assignee Claimed by @azhsmesos View on GitHub
type/feature
Dominant language
Java
Stars
2k
Forks
976
Avg merge
6d 15h
Merged PRs (30d)
7

Description

**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

3. 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?

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.