trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [1/2] incubator-trafodion git commit: Fix for JIRA [TRAFODION-1991]. Commit conflicts should not be reported as FELOCKED
Date Mon, 16 May 2016 20:49:56 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 8110b8d88 -> 8c87a9a5f


Fix for JIRA [TRAFODION-1991].
Commit conflicts should not be reported as FELOCKED


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

Branch: refs/heads/master
Commit: 9715668e37223c0172ad37e9cc6ba721e044e9de
Parents: f058755
Author: Sean Broeder <sbroeder@edev06.esgyn.local>
Authored: Wed May 11 20:11:20 2016 +0000
Committer: Sean Broeder <sbroeder@edev06.esgyn.local>
Committed: Wed May 11 20:11:20 2016 +0000

----------------------------------------------------------------------
 core/sqf/src/tm/tmlib.cpp | 5 +++--
 core/sqf/src/tm/tmtx.cpp  | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9715668e/core/sqf/src/tm/tmlib.cpp
----------------------------------------------------------------------
diff --git a/core/sqf/src/tm/tmlib.cpp b/core/sqf/src/tm/tmlib.cpp
index 54803f5..cd6d434 100644
--- a/core/sqf/src/tm/tmlib.cpp
+++ b/core/sqf/src/tm/tmlib.cpp
@@ -101,7 +101,7 @@ short HBasetoTxnError(short pv_HBerr)
    case RET_READONLY: return FEOK; //Read-only reply is ok
    case RET_ADD_PARAM: return FEBOUNDSERR;
    case RET_EXCEPTION: return FETRANSEXCEPTION;
-   case RET_HASCONFLICT: return FELOCKED; //Change to FEHASCONFLICT?
+   case RET_HASCONFLICT: return FEHASCONFLICT;
    case RET_IOEXCEPTION: return FETRANSIOEXCEPTION;
    case RET_NOCOMMITEX: return FEABORTEDTRANSID;
    default: 
@@ -978,7 +978,8 @@ short ENDTRANSACTION()
          (lv_error == FEOK)  ||
          (lv_error == FEABORTEDTRANSID) ||
          (lv_error == FEENDEDTRANSID) ||
-         (lv_error == FELOCKED))
+         (lv_error == FELOCKED)  ||
+         (lv_error == FEHASCONFLICT))
      {
          // end removes the tx from the list and deletes the
          // enlistment object.  We simply need to delete the trans 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9715668e/core/sqf/src/tm/tmtx.cpp
----------------------------------------------------------------------
diff --git a/core/sqf/src/tm/tmtx.cpp b/core/sqf/src/tm/tmtx.cpp
index f81261f..a57d0d1 100644
--- a/core/sqf/src/tm/tmtx.cpp
+++ b/core/sqf/src/tm/tmtx.cpp
@@ -368,7 +368,7 @@ bool TM_TX_Info::state_change_prepare_helper(CTmTxMessage * pp_msg)
       switch (lv_error)
       {
       case COMMIT_CONFLICT:
-         lv_replyErr = FELOCKED;
+         lv_replyErr = FEHASCONFLICT;
          tm_log_event(TM_HBASE_COMMIT_CONFLICT, SQ_LOG_INFO, "TM_HBASE_COMMIT_CONFLICT",

                       lv_error,-1,node(),seqnum(),-1,lv_replyErr);
          break;
@@ -411,7 +411,7 @@ bool TM_TX_Info::state_change_prepare_helper(CTmTxMessage * pp_msg)
       lv_continue = false;
       break;
    case COMMIT_CONFLICT:
-      state_change_abort_set(pp_msg, FELOCKED);
+      state_change_abort_set(pp_msg, COMMIT_CONFLICT);
       lv_continue = false;
    default:
    // All other errors
@@ -1614,7 +1614,7 @@ bool TM_TX_Info::req_end_complete(CTmTxMessage * pp_msg)
 
    if (isAborting())
    {
-      if(pp_msg->responseError() != FELOCKED)
+      if((pp_msg->responseError() != FELOCKED) && (pp_msg->responseError()
!= FEHASCONFLICT))
          pp_msg->responseError(FEABORTEDTRANSID);
       state_change(TX_ROLLBACK, gv_tm_info.nid(), gv_tm_info.pid(), pp_msg);
    }


Mime
View raw message