Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-714

maxWorkerThreads parameter to THsHaServer has no effect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.2
    • 0.4
    • Java - Library
    • None

    Description

      THsHaServer instantiates its ThreadPoolExecutor with a LinkedBlockingQueue. That behavior is documented in java as:

      There are three general strategies for queuing:
      ...
      2. Unbounded queues. Using an unbounded queue (for example a LinkedBlockingQueue without a predefined capacity) will cause new tasks to wait in the queue when all corePoolSize threads are busy. Thus, no more than corePoolSize threads will ever be created. (And the value of the maximumPoolSize therefore doesn't have any effect.) This may be appropriate when each task is completely independent of others, so tasks cannot affect each others execution; for example, in a web page server. While this style of queuing can be useful in smoothing out transient bursts of requests, it admits the possibility of unbounded work queue growth when commands continue to arrive on average faster than they can be processed.

      therefore changing maxWorkerThreads (passed as maximumPoolSize) has no effect. The parameter should probably just be removed and minWorkerThreads renamed to numThreads, since setting minWorkerThreads does have an effect and is a workaround.

      Attachments

        1. thrift-714.patch
          0.7 kB
          Bryan Duxbury

        Activity

          People

            bryanduxbury Bryan Duxbury
            ericcj Eric Jensen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified