trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trinakrug <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #559: [TRAFODION-1988] Better Java exceptio...
Date Wed, 29 Jun 2016 18:49:47 GMT
Github user trinakrug commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/559#discussion_r69005466
  
    --- Diff: core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
---
    @@ -420,14 +399,21 @@ public short abortTransaction(final long transactionID) throws Exception
{
              if (useTlog) {
                 tLog.putSingleRecord(transactionID, -1, "ABORTED", ts.getParticipatingRegions(),
false);
              }
    -      } catch(Exception e) {
    -         LOG.error("Returning from HBaseTxClient:abortTransaction, txid: " + transactionID
+ " tLog.putRecord: EXCEPTION");
    +      } catch(IOException e) {
    +         LOG.error("Returning from HBaseTxClient:abortTransaction, txid: " + transactionID
+ " tLog.putRecord: EXCEPTION", e);
              return TransReturnCode.RET_EXCEPTION.getShort();
           }
     
           if ((stallWhere == 1) || (stallWhere == 3)) {
              LOG.info("Stalling in phase 2 for abortTransaction");
    -         Thread.sleep(300000); // Initially set to run every 5 min
    +         boolean loopBack = true;
    +         do {
    +            try {
    +               Thread.sleep(300000); // Initially set to run every 5 min
    +            } catch(InterruptedException ie) {
    +               loopBack = true;
    --- End diff --
    
    Should there be a loopBack = false after Thread.sleep in the case where an exception occurred
but then the operation succeeded? 


---
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