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

Nonblocking and HsHa server should make sure to close all their socket connections when the selector exits

Details

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

    Description

      The way it currently works, if the server is commanded to stop, then clients will be left hanging, waiting for IO that will never complete. We should make sure that we clean up any open sockets on our way out of the selector.

      Attachments

        1. THRIFT-1420.diff
          3 kB
          Thomas Kielbus
        2. thrift-1420.patch
          4 kB
          Bryan Duxbury

        Activity

          bryanduxbury Bryan Duxbury added a comment -

          This version is slightly modified so that the test will actually pass for any exception BUT a SocketTimeoutException. Also, I had to port the fix over to ThreadedSelectorServer.

          bryanduxbury Bryan Duxbury added a comment - This version is slightly modified so that the test will actually pass for any exception BUT a SocketTimeoutException. Also, I had to port the fix over to ThreadedSelectorServer.
          bryanduxbury Bryan Duxbury added a comment -

          I just committed this to TRUNK.

          bryanduxbury Bryan Duxbury added a comment - I just committed this to TRUNK.
          hudson Hudson added a comment -

          Integrated in Thrift #315 (See https://builds.apache.org/job/Thrift/315/)
          THRIFT-1420. java: Nonblocking and HsHa server should make sure to close all their socket connections when the selector exits

          This patch makes the selector threads close out all of their open sockets before completely exiting. In testing, this appears to alleviate issues with hanging clients.

          Patch: Thomas Kielbus

          bryanduxbury : http://svn.apache.org/viewvc/?view=rev&rev=1197370
          Files :

          • /thrift/trunk/lib/java/src/org/apache/thrift/server/TNonblockingServer.java
          • /thrift/trunk/lib/java/src/org/apache/thrift/server/TThreadedSelectorServer.java
          • /thrift/trunk/lib/java/test/org/apache/thrift/server/TestNonblockingServer.java
          hudson Hudson added a comment - Integrated in Thrift #315 (See https://builds.apache.org/job/Thrift/315/ ) THRIFT-1420 . java: Nonblocking and HsHa server should make sure to close all their socket connections when the selector exits This patch makes the selector threads close out all of their open sockets before completely exiting. In testing, this appears to alleviate issues with hanging clients. Patch: Thomas Kielbus bryanduxbury : http://svn.apache.org/viewvc/?view=rev&rev=1197370 Files : /thrift/trunk/lib/java/src/org/apache/thrift/server/TNonblockingServer.java /thrift/trunk/lib/java/src/org/apache/thrift/server/TThreadedSelectorServer.java /thrift/trunk/lib/java/test/org/apache/thrift/server/TestNonblockingServer.java

          People

            thomas_kielbus Thomas Kielbus
            bryanduxbury Bryan Duxbury
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: