You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "AnonHxy (via GitHub)" <gi...@apache.org> on 2023/01/29 06:22:10 UTC

[GitHub] [bookkeeper] AnonHxy commented on a diff in pull request #3738: Pin order executor in LedgerHandle

AnonHxy commented on code in PR #3738:
URL: https://github.com/apache/bookkeeper/pull/3738#discussion_r1089874399


##########
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/MockBookKeeper.java:
##########
@@ -49,7 +48,10 @@
  */
 public class MockBookKeeper extends BookKeeper {
 
-    final ExecutorService executor = Executors.newFixedThreadPool(1, new DefaultThreadFactory("mock-bookkeeper"));
+    final OrderedExecutor orderedExecutor = OrderedExecutor.newBuilder()

Review Comment:
   We need call `getMainWorkerPool()`  in `LedgerHandle` constructor method. If we didn't change it, the `getMainWorkerPool()` will return null and throw NPE in the constructor method:
   
   [Line199](https://github.com/apache/bookkeeper/pull/3738/files#diff-1d893bb31553b5e1f55c8301d04ae15f38e0d35f531f9dd22475128b7972ddf9R197-R199)
   



-- 
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: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org