You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by sbroeder <gi...@git.apache.org> on 2016/04/15 20:17:08 UTC

[GitHub] incubator-trafodion pull request: Fix for JIRA [TRAFODION-1935]

GitHub user sbroeder opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/436

    Fix for JIRA [TRAFODION-1935]

    TransactionManager needlessly retries in doPrepareX when an
    UnknownTransactionException is caught

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sbroeder/incubator-trafodion sean_traf

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/436.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #436
    
----
commit 32916f91f5a89019465438648fb708925995dd58
Author: Sean Broeder <sb...@edev03.esgyn.local>
Date:   2016-04-15T18:13:24Z

    Fix for JIRA [TRAFODION-1935]
    TransactionManager needlessly retries in doPrepareX when an
    UnknownTransactionException is caught

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request: Fix for JIRA [TRAFODION-1935]

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/436#discussion_r59942949
  
    --- Diff: core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java ---
    @@ -549,13 +549,15 @@ public SsccCommitResponse call(SsccRegionService instance) throws IOException {
                    retry = false;
                  }
               }
    -          catch (UnknownTransactionException ute) {
    -              LOG.error("Got unknown exception in doCommitX by participant " + participantNum
    -            		  + " for transaction: " + transactionId + " " + ute);
    -              transactionState.requestPendingCountDec(true);
    -              throw new UnknownTransactionException();
    -          }
               catch (Exception e) {
    +             if(e.toString().contains("UnknownTransactionException")) {
    --- End diff --
    
    Is it conceivable that we might get a false positive with a string lookup? (Could the characters "UnknownTransactionException" occur for some other reason in the text, for example as part of a delimited identifier for a Trafodion table name?)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request: Fix for JIRA [TRAFODION-1935]

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-trafodion/pull/436


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-trafodion pull request: Fix for JIRA [TRAFODION-1935]

Posted by selvaganesang <gi...@git.apache.org>.
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/436#discussion_r60524273
  
    --- Diff: core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java ---
    @@ -549,13 +549,15 @@ public SsccCommitResponse call(SsccRegionService instance) throws IOException {
                    retry = false;
                  }
               }
    -          catch (UnknownTransactionException ute) {
    -              LOG.error("Got unknown exception in doCommitX by participant " + participantNum
    -            		  + " for transaction: " + transactionId + " " + ute);
    -              transactionState.requestPendingCountDec(true);
    -              throw new UnknownTransactionException();
    -          }
               catch (Exception e) {
    +             if(e.toString().contains("UnknownTransactionException")) {
    --- End diff --
    
    Please consider using  e instanceof UnknownTransactionException instead to avoid false postives


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---