tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEPHRA-279) If getTransactionAwareName() throws an exception, abort() does not happen
Date Fri, 12 Jan 2018 05:40:00 GMT

    [ https://issues.apache.org/jira/browse/TEPHRA-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16323573#comment-16323573
] 

ASF GitHub Bot commented on TEPHRA-279:
---------------------------------------

GitHub user anew opened a pull request:

    https://github.com/apache/incubator-tephra/pull/69

    (TEPHRA-279) Make TransactionContext resilient to exceptions from getTransactionAwareName()

    

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

    $ git pull https://github.com/anew/incubator-tephra tephra-279-tx-context-fix

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

    https://github.com/apache/incubator-tephra/pull/69.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 #69
    
----
commit 0e4f7c3dd42659f28b716690327c2adc406263c4
Author: anew <anew@...>
Date:   2018-01-12T05:29:10Z

    (TEPHRA-279) Make TransactionContext resilient to exceptions from getTransactionAwareName()

----


> If getTransactionAwareName() throws an exception, abort() does not happen
> -------------------------------------------------------------------------
>
>                 Key: TEPHRA-279
>                 URL: https://issues.apache.org/jira/browse/TEPHRA-279
>             Project: Tephra
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.13.0-incubating
>            Reporter: Andreas Neumann
>            Assignee: Poorna Chandra
>
> The problem is here in TransactionContext:
> {code}
>   private void checkForConflicts() throws TransactionFailureException {
>     Collection<byte[]> changes = Lists.newArrayList();
>     for (TransactionAware txAware : txAwares) {
>       try {
>         changes.addAll(txAware.getTxChanges());
>       } catch (Throwable e) {
>         // ---- PROBLEM: if getTransactionAwareName() throws, abprt() is not called!
>         String message = String.format("Unable to retrieve changes from transaction-aware
'%s' for transaction %d. ",
>                                        txAware.getTransactionAwareName(), currentTx.getTransactionId());
>         LOG.warn(message, e);
>         abort(new TransactionFailureException(message, e));
>         // abort will throw that exception
>       }
>     }
> {code}
> We could consider such a transaction-aware ill-behaved, but we should still make sure
the transaction semantics remain correct. 
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message