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

Improve TThreadPoolServer Handling of Incoming Connections

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Java - Library
    • Labels:
      None
    • Environment:

      th

      Description

      • Uses a confusing variable stopTimeoutVal to control TTL for threads in its thread pools. This configuration is also used to configure how long to wait for server to shutdown. Just set a reasonable default TTL and leave it at that unless someone can demonstrate a strong need
      • If the thread pool is full, there is a configurable back-off time waited for more room to become available in the pool. This adds a lot of complexity to the code and doesn't make a whole lot of sense. Any kind of back-off should be implemented on the client side. The server should simply reject requests if it is overloaded and allow the clients to back off. Right now, since the main thread has to sleep some number of milliseconds, it could be the case that N slots have opened in the pool, but the main thread is still waiting for its sleep cycle to end, thus wasting time. The behavior should be to simply reject the connection if the work queue is saturated.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                belugabehr David Mollitor
                Reporter:
                belugabehr David Mollitor
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

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