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

ASF GitHub Bot commented on TEPHRA-194:
---------------------------------------

GitHub user anew opened a pull request:

    https://github.com/apache/incubator-tephra/pull/18

    [TEPHRA-194] Make startShort() throw IllegalArgumentException …

    … consistently for invalid timeout values.
    
    Previously, it was throwing IllegalArgumentException in-memory and 
Exception for thrift mode. 
    
    This breaks down into:
    - adding a new exception to the thrift stubs to be able to communicate back 
any exception
    - adding a new method startShortWithTimeout that throws that exception
    - modifying the TransactionServiceThriftClient to convert that exception 
back into an IllegalArgumentException
    - modifying the TransactionSystemTest to expect IllegalArgumentException now
    - modifying the ThriftTransactionServerTest to use a retry strategy that 
counts retries and validate that the number of retries is 0 if startShort() 
throws IllegalArgumentException
    - modifying TransactionServiceClient to accept a class name as the retry 
strategy provider (needed for above test case)
    - some unrelated but reasonable style fixes
    
    


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

    $ git pull https://github.com/anew/incubator-tephra tephra-194

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

    https://github.com/apache/incubator-tephra/pull/18.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 #18
    
----
commit 64be9f46b8d3cc823d9eb303f9eb8ed7811375c7
Author: anew <a...@apache.org>
Date:   2016-10-19T23:59:33Z

    [TEPHRA-194] Make startShort() throw IllegalArgumentException consistently 
for invalid timeout values

----


> Transaction client should not retry startShort() if an invalid timeout is 
> given 
> --------------------------------------------------------------------------------
>
>                 Key: TEPHRA-194
>                 URL: https://issues.apache.org/jira/browse/TEPHRA-194
>             Project: Tephra
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.9.0-incubating, 0.10.0-incubating
>            Reporter: Andreas Neumann
>            Assignee: Andreas Neumann
>             Fix For: 0.10.0-incubating
>
>
> Currently, if an invalid timeout (negative, or too long) is given, the Tx 
> manager throws an IllegalArgumentException. The thrift client will catch that 
> and apply the retry strategy. However, in this case, retry is pointless, and 
> if the strategy is, for example, exponential backoff, if introduces 
> unneccessary load and latency. 
> The service should instead throw a meaningful exception for that, so that the 
> client knows not to retry. 



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

Reply via email to