You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2017/03/22 01:55:46 UTC

[2/3] incubator-trafodion git commit: fix based on review comments.

fix based on 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/8f3b8367
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/8f3b8367
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/8f3b8367

Branch: refs/heads/master
Commit: 8f3b8367400790a1f0677dc41a0cfd2339079594
Parents: d133d62
Author: Prashant Vasudev <pr...@esgyn.com>
Authored: Tue Mar 21 20:23:29 2017 +0000
Committer: Prashant Vasudev <pr...@esgyn.com>
Committed: Tue Mar 21 20:23:29 2017 +0000

----------------------------------------------------------------------
 .../java/org/trafodion/dtm/HBaseTxClient.java   | 22 +++++++++++---------
 1 file changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8f3b8367/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 cef53b1..a967dac 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
@@ -1114,10 +1114,10 @@ public class HBaseTxClient {
                         boolean loopBack = false;
                         if(ddlOnlyRecoveryCheck)
                         {
+                          ddlOnlyRecoveryCheck = false;
                           transactionStates = getTransactionsFromTmDDL();
                           if(transactionStates != null)
                             recoverTransactions(transactionStates);
-                          ddlOnlyRecoveryCheck = false;
                         }
                         
                         do {
@@ -1396,17 +1396,19 @@ public class HBaseTxClient {
             } catch (UnsuccessfulDDLException ddle) {
                 LOG.error("UnsuccessfulDDLException encountered by Recovery Thread. Registering for retry. txID: " + txID + "Exception " , ddle);
   
-                //Note that there may not be anymore redrive triggers from region server point of view for DDL operation.
-                //Register this DDL transaction for subsequent redrive from Audit Control Event.
-                //TODO: Launch a new Redrive Thread out of auditControlPoint().
-                TmDDL tmDDL = hbtx.getTmDDL();
-                tmDDL.setState(txID,"REDRIVE");
-                LOG.error("TRAF RCOV THREAD:Error calling TmDDL putRow Redrive");
+                //Do not change the state of txId in tmDDL. Let the recovery thread
+                //detect this txID again and redrive. Reset flag to loop back and
+                //check for tmDDL again.
+                ddlOnlyRecoveryCheck = true;
+                
             } catch (CommitUnsuccessfulException cue) {
                 LOG.error("CommitUnsuccessfulException encountered by Recovery Thread. Registering for retry. txID: " + txID + "Exception " , cue);
-                TmDDL tmDDL = hbtx.getTmDDL();
-                tmDDL.setState(txID,"REDRIVE");
-                LOG.error("TRAF RCOV THREAD:Error calling TmDDL putRow Redrive");
+                
+                //Do not change the state of txId in tmDDL. Let the recovery thread
+                //detect this txID again and redrive. Reset flag to loop back and
+                //check for tmDDL again.
+                ddlOnlyRecoveryCheck = true;
+
             }
         }
       }//recoverTransactions()