trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lium...@apache.org
Subject [1/2] incubator-trafodion git commit: Fix for [Trafodion-2348] TransactionState.hasConflict gets a null pointer exception
Date Mon, 14 Nov 2016 04:27:35 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 44be0aba1 -> 34772bc17


Fix for [Trafodion-2348]
TransactionState.hasConflict gets a null pointer exception


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

Branch: refs/heads/master
Commit: 99ecd26c7e39252d4ebc2cfe27097cba77fcbcf4
Parents: e17bdcd
Author: Sean Broeder <sbroeder@edev06.esgyn.local>
Authored: Fri Nov 11 19:02:24 2016 +0000
Committer: Sean Broeder <sbroeder@edev06.esgyn.local>
Committed: Fri Nov 11 19:02:24 2016 +0000

----------------------------------------------------------------------
 .../transactional/TrxTransactionState.java.tmpl        | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/99ecd26c/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/TrxTransactionState.java.tmpl
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/TrxTransactionState.java.tmpl
b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/TrxTransactionState.java.tmpl
index 42d5a2d..6d074f2 100644
--- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/TrxTransactionState.java.tmpl
+++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/TrxTransactionState.java.tmpl
@@ -443,7 +443,7 @@ public class TrxTransactionState extends TransactionState {
                 // for this transaction to commit.
                 LOG.error("TrxTransactionState hasConflict: Returning true. Caught exception
for transaction "
                         + transactionState.toString() + ", regionInfo is [" + regionInfo.getRegionNameAsString()
-                        + "], exception is " + e.toString());
+                        + "], exception ", e);
                 return true;
             }
         }
@@ -500,9 +500,14 @@ public class TrxTransactionState extends TransactionState {
                         LOG.trace("Transaction [" + this.toString() + "] scans was empty
");
                 }
             } catch (Exception e) {
-                LOG.warn("TrxTransactionState hasConflict: Unable to get row - this Transaction
[" + this.toString()
-                        + "] checkAgainst Transaction [" + checkAgainst.toString() + "] "
+ " Exception: " + e);
-                throw e;
+               if (checkAgainst.getStatus().equals(TransactionState.Status.ABORTED)){
+                  return false;
+               }
+               else {
+                  LOG.warn("TrxTransactionState hasConflict: Unable to get row - this Transaction
[" + this.toString()
+                       + "] checkAgainst Transaction [" + checkAgainst.toString() + "] "
+ " Exception: ", e);
+                  throw e;
+               }
             }
         }
         return false;


Mime
View raw message