trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #627: [TRAFODION-2129] Trafodion to avoid u...
Date Tue, 02 Aug 2016 19:45:30 GMT
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/627#discussion_r73223651
  
    --- Diff: core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java
---
    @@ -2436,56 +2409,44 @@ public Integer call() throws IOException {
                     return doAbortX(regionName, transactionState.getTransactionId(), participantNum,
location.isTableRecodedDropped());
                   }
                 });
    -/*
    -          } catch (Exception e) {
    -            LOG.error("exception in abort: " + e);
    -          }
    -*/
    -            /*
    -            } catch (UnknownTransactionException e) {
    -        LOG.error("exception in abort: " + e);
    -                LOG.info("Got unknown transaction exception during abort. Transaction:
["
    -                        + transactionState.getTransactionId() + "], region: ["
    -                        + location.getRegionInfo().getRegionNameAsString() + "]. Ignoring.");
    -            } catch (NotServingRegionException e) {
    -                LOG.info("Got NSRE during abort. Transaction: [" + transactionState.getTransactionId()
+ "], region: ["
    -                        + location.getRegionInfo().getRegionNameAsString() + "]. Ignoring.");
    -            }
    -            */
             }
     
             // all requests sent at this point, can record the count
             transactionState.completeSendInvoke(loopCount);
         }
    +         
    +        CommitUnsuccessfulException savedCue = null;
     
             //if DDL is involved with this transaction, need to unwind it.
             if(transactionState.hasDDLTx())
             {
     
                 //First wait for abort requests sent to all regions is received back.
                 //This TM thread gets SUSPENDED until all abort threads complete!!!
    -            try{
    +            boolean loopExit = false;
    +            do
    +            {
    +              try {
                     transactionState.completeRequest();
    -            }
    -            catch(Exception e){
    -                LOG.error("Exception in abort() completeRequest. txID: " + transactionState.getTransactionId()
+ "Exception: " + e);
    -                //return; //Do not return here. This thread should continue servicing
DDL operations.
    -            }
    -
    -            try{
    -                abortDDL(transactionState);
    -            }
    -            catch(Exception e){
    -                LOG.error("FATAL Exception calling abortDDL for transaction: " + transactionState.getTransactionId()
+ "Exception: "  + e);
    -                throw new UnsuccessfulDDLException(e);
    -            }
    +                loopExit = true; 
    +              } 
    +              catch (InterruptedException ie) {}
    +              catch (CommitUnsuccessfulException cue) {
    +                 loopExit = true;
    +                 LOG.error("Exception at the time of aborting DDL transaction", cue);

    --- End diff --
    
    Will do next time when this area of code is modified.  This change is already merged


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