You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/03/14 17:54:16 UTC
[GitHub] sijie commented on a change in pull request #1258: Allow to send callbacks from journal thread
sijie commented on a change in pull request #1258: Allow to send callbacks from journal thread
URL: https://github.com/apache/bookkeeper/pull/1258#discussion_r174553374
##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
##########
@@ -625,8 +626,12 @@ public Journal(File journalDirectory, ServerConfiguration conf, LedgerDirsManage
this.maxGroupWaitInNanos = TimeUnit.MILLISECONDS.toNanos(conf.getJournalMaxGroupWaitMSec());
this.bufferedWritesThreshold = conf.getJournalBufferedWritesThreshold();
this.bufferedEntriesThreshold = conf.getJournalBufferedEntriesThreshold();
- this.cbThreadPool = Executors.newFixedThreadPool(conf.getNumJournalCallbackThreads(),
- new DaemonThreadFactory());
+ if (conf.getNumJournalCallbackThreads() > 0) {
+ this.cbThreadPool = Executors.newFixedThreadPool(conf.getNumJournalCallbackThreads(),
Review comment:
interesting.. I thought we used OrderedScheduler here as well.
I actually checked twitter's branch, it does use ordered scheduler. I believe cbThreadPool was first introduced by twitter sometime back.
https://github.com/twitter/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java#L577
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services