trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ansha...@apache.org
Subject [01/14] incubator-trafodion git commit: Second set of changes for JIRA [TRAFODION-1435] Region operations performed transactionally for delete, chackAndDelete Improved endpoint coprocessor exception logging
Date Sun, 25 Sep 2016 01:57:38 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 3ad30f51e -> b37c1a170


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1e4a88d3/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/SsccRegion.proto
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/SsccRegion.proto b/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/SsccRegion.proto
index 14eb31c..87d765a 100644
--- a/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/SsccRegion.proto
+++ b/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/SsccRegion.proto
@@ -106,7 +106,7 @@ message SsccCheckAndDeleteResponse {
 }
 
 message SsccCheckAndDeleteRegionTxRequest {
-  required int64 transactionId = 1;
+  required int64 tid = 1;
   required int64 startId = 2;
   required bytes regionName = 3;
   required bytes row = 4;
@@ -183,6 +183,21 @@ message SsccDeleteMultipleTransactionalResponse {
   optional int32  status = 4;
 }
 
+message SsccDeleteRegionTxRequest {
+  required int64 tid = 1;
+  required int64 startId = 2;
+  required bytes regionName = 3;
+  required MutationProto delete = 4;
+  required bool autoCommit = 5;
+}
+
+message SsccDeleteRegionTxResponse {
+  optional Result result = 1;
+  optional string exception = 2;
+  optional bool hasException = 3;
+  optional int32  status = 4;
+}
+
 message SsccDeleteTransactionalRequest {
   required int64 transactionId = 1;
   required int64 startId = 2;
@@ -337,8 +352,8 @@ service SsccRegionService {
     returns(SsccBeginTransactionResponse);
   rpc checkAndDelete(SsccCheckAndDeleteRequest)
     returns(SsccCheckAndDeleteResponse);
-//  rpc checkAndDeleteRegionTx(SsccCheckAndDeleteRegionTxRequest)
-//    returns(SsccCheckAndDeleteRegionTxResponse);
+  rpc checkAndDeleteRegionTx(SsccCheckAndDeleteRegionTxRequest)
+    returns(SsccCheckAndDeleteRegionTxResponse);
   rpc checkAndPut(SsccCheckAndPutRequest)
     returns(SsccCheckAndPutResponse);
   rpc checkAndPutRegionTx(SsccCheckAndPutRegionTxRequest)
@@ -351,6 +366,8 @@ service SsccRegionService {
     returns(SsccCommitIfPossibleResponse);
   rpc commitRequest(SsccCommitRequestRequest)
     returns(SsccCommitRequestResponse);
+  rpc deleteRegionTx(SsccDeleteRegionTxRequest)
+    returns(SsccDeleteRegionTxResponse);
   rpc delete(SsccDeleteTransactionalRequest)
     returns(SsccDeleteTransactionalResponse);
   rpc deleteMultiple(SsccDeleteMultipleTransactionalRequest)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1e4a88d3/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/TrxRegion.proto
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/TrxRegion.proto b/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/TrxRegion.proto
index 5327cf1..a0a1385 100755
--- a/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/TrxRegion.proto
+++ b/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/TrxRegion.proto
@@ -145,7 +145,7 @@ message CheckAndDeleteResponse {
 }
 
 message CheckAndDeleteRegionTxRequest {
-  required int64 transactionId = 1;
+  required int64 tid = 1;
   required bytes regionName = 2;
   required bytes row = 3;
   required bytes family = 4;
@@ -217,6 +217,19 @@ message DeleteMultipleTransactionalResponse {
   optional bool hasException = 3;
 }
 
+message DeleteRegionTxRequest {
+  required int64 tid = 1;
+  required bytes regionName = 2;
+  required MutationProto delete = 3;
+  required bool autoCommit = 4;
+}
+
+message DeleteRegionTxResponse {
+  optional Result result = 1;
+  optional string exception = 2;
+  optional bool hasException = 3;
+}
+
 message DeleteTransactionalRequest {
   required int64 transactionId = 1;
   required bytes regionName = 2;
@@ -442,8 +455,8 @@ service TrxRegionService {
     returns(BeginTransactionResponse);
   rpc checkAndDelete(CheckAndDeleteRequest)
     returns(CheckAndDeleteResponse);
-//  rpc checkAndDeleteRegionTx(CheckAndDeleteRegionTxRequest)
-//    returns(CheckAndDeleteRegionTxResponse);
+  rpc checkAndDeleteRegionTx(CheckAndDeleteRegionTxRequest)
+    returns(CheckAndDeleteRegionTxResponse);
   rpc checkAndPut(CheckAndPutRequest)
     returns(CheckAndPutResponse);
   rpc checkAndPutRegionTx(CheckAndPutRegionTxRequest)
@@ -460,6 +473,8 @@ service TrxRegionService {
     returns(CommitMultipleResponse);
   rpc commitRequest(CommitRequestRequest)
     returns(CommitRequestResponse);
+  rpc deleteRegionTx(DeleteRegionTxRequest)
+    returns(DeleteRegionTxResponse);
   rpc delete(DeleteTransactionalRequest)
     returns(DeleteTransactionalResponse);
   rpc deleteMultiple(DeleteMultipleTransactionalRequest)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1e4a88d3/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
----------------------------------------------------------------------
diff --git a/core/sql/src/main/java/org/trafodion/sql/HTableClient.java b/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
index 3573e90..4c99290 100644
--- a/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
+++ b/core/sql/src/main/java/org/trafodion/sql/HTableClient.java
@@ -1388,12 +1388,10 @@ public class HTableClient {
 					if (useTRex && (transID != 0)) {
 			           table.delete(transID, del);
                     }
-//                    else if (useRegionTransaction){
-//                        logger.info("deleteRow using region TX");
-//                        table.deleteRegionTx(del, /* auto-commit */ true);
-//                    }
+                    else if (useRegionTransaction){
+                        table.deleteRegionTx(del, /* auto-commit */ true);
+                    }
                     else {
-//                       logger.info("deleteRow without transID ");
                        table.delete(del);
                     }
 					return true;
@@ -1404,10 +1402,9 @@ public class HTableClient {
 			if (useTRex && (transID != 0)) {
 	           table.delete(transID, del);
             }
-//            else if (useRegionTransaction){
-//               logger.info("deleteRow using region TX");
-//               table.deleteRegionTx(del, /* auto-commit */ true);
-//            }
+            else if (useRegionTransaction){
+               table.deleteRegionTx(del, /* auto-commit */ true);
+            }
             else {
                table.delete(del);
             }
@@ -1502,11 +1499,10 @@ public class HTableClient {
 			if (useTRex && (transID != 0)) {
 			    res = table.checkAndDelete(transID, rowID, family, qualifier, colValToCheck, del);
             }
-//            else if (useRegionTransaction){
-//               logger.info("checkAndDeleteRow using region TX");
-//               res = table.checkAndDeleteRegionTx(rowID, family, qualifier, colValToCheck,
-//               		         del, /* autoCommit */ true);
-//            }
+            else if (useRegionTransaction){
+               res = table.checkAndDeleteRegionTx(rowID, family, qualifier, colValToCheck,
+               		         del, /* autoCommit */ true);
+            }
             else {
 			   res = table.checkAndDelete(rowID, family, qualifier, colValToCheck, del);
             }
@@ -1566,10 +1562,8 @@ public class HTableClient {
                                      family1, qualifier1, colValToCheck, put);
                        }
                        else if (useRegionTransaction){
-                           if (logger.isTraceEnabled()) logger.trace("checkAndPutRegionTx
with regionTX ");
-                           res = table.checkAndPutRegionTx(rowID, 
+                          res = table.checkAndPutRegionTx(rowID, 
                                            family1, qualifier1, colValToCheck, put, /* auto-commit
*/ true);
-                    	   
                        }
                        else {
                           res = table.checkAndPut(rowID, 
@@ -1581,9 +1575,8 @@ public class HTableClient {
                           table.put(transID, put);
                        }
                        else if (useRegionTransaction){
-                          if (logger.isTraceEnabled()) logger.trace("putRow using putRegionTx");
                           table.putRegionTx(put, /* auto-commit */ true);
-                       }else{ 
+                       }else{
                           table.put(put);
 					   }
 					}
@@ -1599,8 +1592,7 @@ public class HTableClient {
 						family1, qualifier1, colValToCheck, put);
                }
                else if (useRegionTransaction){
-                   if (logger.isTraceEnabled()) logger.trace("checkAndPutRegionTx using regionTX
");
-                   result = table.checkAndPutRegionTx(rowID, family1, qualifier1,
+                  result = table.checkAndPutRegionTx(rowID, family1, qualifier1,
                 		   colValToCheck, put, /* auto-commit */ true);
                }
                else {
@@ -1613,8 +1605,7 @@ public class HTableClient {
                   table.put(transID, put);
                }
                else if (useRegionTransaction){
-                  if (logger.isTraceEnabled()) logger.trace("putRow using putRegionTx");
-                  table.putRegionTx(put, true /* also commit */);
+                  table.putRegionTx(put, /* auto commit */ true);
                }else{
                   table.put(put);
                }


Mime
View raw message