[
https://issues.apache.org/jira/browse/THRIFT-11?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Reiss updated THRIFT-11:
------------------------------
Attachment: graceful_shutdown-v3.patch
This is definitely something that belongs in the trunk. What do you think of
this version that also keeps (approximate) track of the elapsed time so that we
don't block forever if we keep getting interrupted.
> TThreadPoolServer won't shut down gracefully
> --------------------------------------------
>
> Key: THRIFT-11
> URL: https://issues.apache.org/jira/browse/THRIFT-11
> Project: Thrift
> Issue Type: Bug
> Components: Library (Java)
> Reporter: Bryan Duxbury
> Attachments: graceful_shutdown-v2.patch, graceful_shutdown-v3.patch,
> graceful_shutdown.patch
>
>
> The way I'm reading TThreadPoolServer.java, it looks like the stop() method's
> intent is to let the server shut down gracefully. However, because of the way
> that the WorkerProcess work loop is structured, if the clients are
> consistently making requests, the requests will keep getting served until the
> ThreadPoolExecutor's shutdown timeout expires, at which point the client
> threads will be forcibly aborted. This is because the innermost while loop
> around processor.process does not check the server's shutdown_ flag.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.