You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/04/26 06:15:13 UTC

[jira] [Commented] (THRIFT-3797) Generated Delphi processor shouldn't error out on timed out exceptions

    [ https://issues.apache.org/jira/browse/THRIFT-3797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15257539#comment-15257539 ] 

ASF GitHub Bot commented on THRIFT-3797:
----------------------------------------

GitHub user kjpowerworld opened a pull request:

    https://github.com/apache/thrift/pull/994

    THRIFT-3797: Generated Delphi processor shouldn't error out on timed out exceptions

    See extensive comment in JIRA.  However, this code mirrors what happens in TConnectedClient.cpp, where TConnectedClient.run() doesn't abort the processing loop when a timeout occurs, because a timeout isn't an error condition when waiting for a new RPC call to arrive.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/powerworld/thrift fixes/THRIFT-3797

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/994.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #994
    
----
commit 269c00040c78f355b76e207bdd2345f2b8605a6b
Author: Kyle Johnson <ky...@powerworld.com>
Date:   2016-04-26T04:00:54Z

    Server processor should ignore timed out exceptions when waiting for a new message to arrive.  Timing out is not an error in this case.

----


> Generated Delphi processor shouldn't error out on timed out exceptions
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-3797
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3797
>             Project: Thrift
>          Issue Type: Bug
>          Components: Delphi - Compiler, Delphi - Library
>            Reporter: Kyle Johnson
>
> When the generated service processor waits on a new message to arrive in the TProcessorImpl.Process() function, it treats all exceptions identically, causing the function to return False when an exception is raised.  When returning false, the server treats this as an error, aborts the processing loop and subsequently aborts the connection, tears down all connection information and then waits for a new connection.
> However, this is undesired in the situation where a message hasn't arrived for longer than the configured timeout of the connection.  In this instance, the server shouldn't consider the timeout to be an error, because it is desired to have the server continue running even when an RPC call hasn't been received in longer than the duration of the timeout.
> The patch fixes this issue by catching the timeout exception and returning success even when a timeout occurs, allowing the server to continue execution with the current connection.  This behavior mirrors what happens in the C++ library in TConnectedClient.cpp, where in TConnectedClient.run(), TIMED_OUT exception types don't cause the processing loop to abort.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)