Ran
|
Jobs
1
|
Files
401
|
Run time
22s
|
Badge
Embed ▾
README BADGES
|
push
jenkins
<a href="https://github.com/apache/bookkeeper/commit/<a class=hub.com/apache/bookkeeper/commit/46171e67e526702487641438144f28b7eb1aa07b">46171e67e<a href="https://github.com/apache/bookkeeper/commit/46171e67e526702487641438144f28b7eb1aa07b">">Refactored OrderedSafeExecutor and OrderedScheduler As outlined in https://lists.apache.org/thread.html/</a><a class="double-link" href="https://github.com/apache/bookkeeper/commit/<a class="double-link" href="https://github.com/apache/bookkeeper/commit/102383ea42f473f36720637e41af0ee83fc38d9f">102383ea4</a>">102383ea4</a><a href="https://github.com/apache/bookkeeper/commit/46171e67e526702487641438144f28b7eb1aa07b">992736e0d1a7f985%3Cdev.bookkeeper.apache.org%3E right now `OrderedSafeExecutor` is implemented on top of `OrderedScheduler`. There are few problems with this approach that are causing impact on performance: 1. `OrderedScheduler` is a `ScheduledExecutorService` which uses a priority queue for tasks. The priority queue has a single mutex for both publishers/consumers on the queue 2. There are many objects created for each task submission, due to listenable future decorators Since in all cases in critical write/read path we don't need delay task execution or futures, we should try to have a light weight execution for that. ### Modifications * Inverted the hierarchy between `OrderedSafeExecutor` and `OrderedScheduler`. Now the base class is `OrderedSafeExecutor` and the other extends from it, since it provides additional methods. * Moved `OrderedSafeExecutor` in `bookkeeper-common` since `OrderedScheduler` was already there. * Moved `OrderedSafeGenericCallback` in its own file, since it needs to be in `bookkeeper-server` module at this point. * Changed some method names from `submitOrdered()` into `executeOrdered()` to be consistent with JDK name (`submit()` returns a future while `execute()` returns void). * Changed `BookKeeper` instance of `scheduler` into `OrderedScheduler` so that the few cases which were using the `mainWorkerPool` could be easily converted to use the scheduler instead. Author: Matteo Merli <mmerli@apache.org> Reviewers: Andrey Yegorov <None>, Enrico Olivelli <eolivelli@gmail.com>... (continued)
23056 of 31827 relevant lines covered (72.44%)
0.72 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 41.1 | 401 |
72.44 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|