tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEPHRA-188) There should be a way to limit the transaction timeout
Date Thu, 06 Oct 2016 23:46:20 GMT

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

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

Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/17#discussion_r82304628
  
    --- Diff: tephra-core/src/main/java/org/apache/tephra/TransactionManager.java ---
    @@ -722,7 +725,10 @@ public Transaction startShort() {
        * @param timeoutInSeconds the time out period in seconds.
        */
       public Transaction startShort(int timeoutInSeconds) {
    -    Preconditions.checkArgument(timeoutInSeconds > 0, "timeout must be positive but
is %s", timeoutInSeconds);
    +    Preconditions.checkArgument(timeoutInSeconds > 0,
    +                                "timeout must be positive but is %s", timeoutInSeconds);
    +    Preconditions.checkArgument(timeoutInSeconds <= maxTimeout,
    +                                "timeout must not exceed %s but is %s", maxTimeout, timeoutInSeconds);
    --- End diff --
    
    It would be good to add the units here


> There should be a way to limit the transaction timeout
> ------------------------------------------------------
>
>                 Key: TEPHRA-188
>                 URL: https://issues.apache.org/jira/browse/TEPHRA-188
>             Project: Tephra
>          Issue Type: Improvement
>          Components: api, manager
>    Affects Versions: 0.9.0-incubating
>            Reporter: Andreas Neumann
>            Assignee: Andreas Neumann
>             Fix For: 0.10.0-incubating
>
>
> When clients start a transaction, they can give a custom timeout for the transaction.
If a client uses a really long timeout, then crashes and never commits or invalidates, then
this will remain an active transaction forever. In some use cases, it is therefore desirable
to impose a system-wide limit on that timeout. 
> I am proposing to add a new property data.tx.max.timeout to the configuration. This can
be optional, but if set, it limits the custom transaction timeout for startShort(int timeout).




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

Mime
View raw message