You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Erik Frey (JIRA)" <ji...@apache.org> on 2008/09/25 23:55:44 UTC

[jira] Updated: (THRIFT-149) TNonBlockingServer graceful shutdown

     [ https://issues.apache.org/jira/browse/THRIFT-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik Frey updated THRIFT-149:
-----------------------------

    Attachment: nonblocking_graceful_shutdown.patch

Patch to TNonBlockingServer to handle IllegalStateException from ThreadManager.

> TNonBlockingServer graceful shutdown
> ------------------------------------
>
>                 Key: THRIFT-149
>                 URL: https://issues.apache.org/jira/browse/THRIFT-149
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (C++)
>            Reporter: Erik Frey
>            Priority: Minor
>         Attachments: nonblocking_graceful_shutdown.patch
>
>
> There doesn't seem to be a way to gracefully shutdown TNonBlockingServer - this patch is a start.  It allows TNonBlockingServer to gracefully handle a ThreadManager that's being stopped (and finishing up its workers) -- if it catches an IllegalStateException when it tries to add a task, it simply closes the connection.
> This allows the server implementor to stop the thread manager first, then dismantle the rest of the server.  Clients that made it through before the thread manager was stopped receive a response, and clients after receive an abruptly closed connection.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.