[ https://issues.apache.org/jira/browse/TEPHRA-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15593224#comment-15593224 ]
ASF GitHub Bot commented on TEPHRA-194: --------------------------------------- Github user poornachandra commented on a diff in the pull request: https://github.com/apache/incubator-tephra/pull/18#discussion_r84388540 --- Diff: tephra-core/src/test/java/org/apache/tephra/ThriftTransactionSystemTest.java --- @@ -124,4 +127,39 @@ protected TransactionSystemClient getClient() throws Exception { protected TransactionStateStorage getStateStorage() throws Exception { return storage; } + + @Override + public void testNegativeTimeout() throws Exception { + CountingRetryStrategyProvider.retries.set(0); + super.testNegativeTimeout(); + Assert.assertEquals(0, CountingRetryStrategyProvider.retries.get()); --- End diff -- It would be good to add a comment on why the retries should be zero here. > 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)