trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #649: [TRAFODION-2129] Trafodion to avoid u...
Date Wed, 10 Aug 2016 16:38:54 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/649#discussion_r74281350
  
    --- Diff: core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java
---
    @@ -2232,7 +2232,7 @@ public void doCommitDDL(final TransactionState transactionState)
throws Unsucces
                             if (retry) 
                                 retrySleep = retry(retrySleep);
                         }
    -                } while (retry == true);
    +                } while (retry && retryCount++ <= RETRY_ATTEMPTS);
    --- End diff --
    
    The code you have is fine. It could be made a bit simpler though perhaps by using just
one variable, retryCount, and counting down instead of up. You could then simply test retryCount
> 0. In code paths where you decide to not retry, just set retryCount = 0.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message