trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sand...@apache.org
Subject [4/6] incubator-trafodion git commit: [TRAFODION-1988] Better Java exception handling in Trafodion - Part2
Date Fri, 08 Jul 2016 07:39:26 GMT
[TRAFODION-1988] Better Java exception handling in Trafodion - Part2

Changes as per the review comments


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/2fd0e4ff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/2fd0e4ff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/2fd0e4ff

Branch: refs/heads/master
Commit: 2fd0e4ff7b01ff0caf1d848e46cde2ebc3f539bc
Parents: ca9f2fb
Author: selvaganesang <selva.govindarajan@esgyn.com>
Authored: Wed Jul 6 18:54:23 2016 +0000
Committer: selvaganesang <selva.govindarajan@esgyn.com>
Committed: Wed Jul 6 18:54:23 2016 +0000

----------------------------------------------------------------------
 .../main/java/org/trafodion/dtm/HBaseTxClient.java  |  9 ++++++++-
 .../main/java/org/trafodion/dtm/TmAuditTlog.java    | 16 ++++++++--------
 2 files changed, 16 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2fd0e4ff/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
b/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
index e7f863a..c4cb7dc 100644
--- a/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
+++ b/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/HBaseTxClient.java
@@ -338,6 +338,7 @@ public class HBaseTxClient {
        boolean loopBack = false;
        do {
           try {
+             loopBack = false;
              rt.join();
           } catch (InterruptedException e) { 
              LOG.warn("Problem while waiting for the recovery thread to stop for node ID:
" + nodeID, e);
@@ -406,9 +407,10 @@ public class HBaseTxClient {
 
       if ((stallWhere == 1) || (stallWhere == 3)) {
          LOG.info("Stalling in phase 2 for abortTransaction");
-         boolean loopBack = true;
+         boolean loopBack = false;
          do {
             try {
+               loopBack = false;
                Thread.sleep(300000); // Initially set to run every 5 min
             } catch(InterruptedException ie) {
                loopBack = true;
@@ -441,6 +443,7 @@ public class HBaseTxClient {
              boolean loopBack = false;
              do {
                 try {
+                    loopBack = false;
                     commitDDLLock.wait();
                 } catch(InterruptedException ie) {
                     LOG.warn("Interrupting commitDDLLock.wait,  but retrying ", ie);
@@ -548,6 +551,7 @@ public class HBaseTxClient {
           boolean loopBack = false;
           do {
              try {
+                loopBack = false;
                 Thread.sleep(300000); // Initially set to run every 5 min
              } catch(InterruptedException ie) {
                  loopBack = true;
@@ -577,6 +581,7 @@ public class HBaseTxClient {
              boolean loopBack = false;
              do {
                 try {
+                   loopBack = false;
                    commitDDLLock.wait();
                 } catch(InterruptedException ie) {
                     LOG.warn("Interrupting commitDDLLock.wait,  but retrying ", ie);
@@ -615,6 +620,7 @@ public class HBaseTxClient {
        do {
           try {
              if (LOG.isTraceEnabled()) LOG.trace("TEMP completeRequest Calling CompleteRequest()
Txid :" + transactionId);
+             loopBack = false;
              ts.completeRequest();
           } catch(InterruptedException ie) {
               LOG.warn("Interrupting HBaseTxClient:completeRequest but retrying, ts.completeRequest:
txid: " + transactionId + ", EXCEPTION: ", ie);
@@ -964,6 +970,7 @@ public class HBaseTxClient {
                         boolean loopBack = false;
                         do {
                            try {
+                               loopBack = false;
                                regions = zookeeper.checkForRecovery();
                            } catch(InterruptedException ie) {
                               loopBack = true;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2fd0e4ff/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/TmAuditTlog.java
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/TmAuditTlog.java
b/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/TmAuditTlog.java
index 8a28d8e..78fe712 100644
--- a/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/TmAuditTlog.java
+++ b/core/sqf/src/seatrans/tm/hbasetmlib2/src/main/java/org/trafodion/dtm/TmAuditTlog.java
@@ -814,14 +814,13 @@ public class TmAuditTlog {
       if (LOG.isTraceEnabled()) LOG.trace("deleteRecord start " + lvTransid);
       String transidString = new String(String.valueOf(lvTransid));
       int lv_lockIndex = (int)(lvTransid & tLogHashKey);
-      //try {
-         Delete d;
-         //create our own hashed key
-         long key = (((lvTransid & tLogHashKey) << tLogHashShiftFactor) + (lvTransid
& 0xFFFFFFFF));
-         if (LOG.isTraceEnabled()) LOG.trace("key: " + key + " hex: " + Long.toHexString(key));
-         d = new Delete(Bytes.toBytes(key));
-         if (LOG.isTraceEnabled()) LOG.trace("deleteRecord  (" + lvTransid + ") ");
-         table[lv_lockIndex].delete(d);
+      Delete d;
+      //create our own hashed key
+      long key = (((lvTransid & tLogHashKey) << tLogHashShiftFactor) + (lvTransid
& 0xFFFFFFFF));
+      if (LOG.isTraceEnabled()) LOG.trace("key: " + key + " hex: " + Long.toHexString(key));
+      d = new Delete(Bytes.toBytes(key));
+      if (LOG.isTraceEnabled()) LOG.trace("deleteRecord  (" + lvTransid + ") ");
+      table[lv_lockIndex].delete(d);
       if (LOG.isTraceEnabled()) LOG.trace("deleteRecord - exit");
       return true;
    }
@@ -1231,6 +1230,7 @@ public class TmAuditTlog {
                do 
                {
                try {
+                   loopBack = false;
                    int partialResult = compPool.take().get();
                    if (LOG.isTraceEnabled()) LOG.trace("deleteEntriesOlderThanASN partial
result: " + partialResult
                 		      + " loopIndex " + loopIndex + " regionIndex " + regionIndex);


Mime
View raw message