yzang commented on a change in pull request #1308:  longPollThreadPool can not 
be null
URL: https://github.com/apache/bookkeeper/pull/1308#discussion_r178168776
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java
 ##########
 @@ -1288,10 +1288,15 @@ public ServerConfiguration 
setNumLongPollWorkerThreads(int numThreads) {
 
     /**
      * Get the number of threads that should handle long poll requests.
-     * @return
+     *
+     * <p>If the number of threads is zero or negative, bookie will fallback to
+     * use read threads. If there is no read threads used, it will create a 
thread pool
+     * with {@link Runtime#availableProcessors()} threads.
+     *
+     * @return the number of threads that should handle long poll requests, 
default value is 0.
      */
     public int getNumLongPollWorkerThreads() {
-        return getInt(NUM_LONG_POLL_WORKER_THREADS, 10);
+        return getInt(NUM_LONG_POLL_WORKER_THREADS, 0);
 
 Review comment:
   What's the benefit of using 0 as the default value? Wouldn't it cause long 
poll read interfere with catch up read?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to