You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Mike Percy (JIRA)" <ji...@apache.org> on 2013/04/06 04:39:16 UTC

[jira] [Commented] (FLUME-1321) BasicTransactionSemantics should never throw from close()

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

Mike Percy commented on FLUME-1321:
-----------------------------------

Not sure about these lines:

+    if( Thread.currentThread().getId() != initialThreadId )
+       LOGGER.error("close() called from different thread than getTransaction()!");
+

I think we gotta throw on that one. That is absolutely bad bad bad.

These ones I agree with:

+    if( state.equals(State.NEW) || state.equals(State.COMPLETED) )
+       LOGGER.error("close() called when transaction is {} " +
+              "- you must either commit or rollback first", state);

As long as we do an implicit rollback when it happens. Would be great to get this posted to reviewboard. Thanks Roshan!
                
> BasicTransactionSemantics should never throw from close()
> ---------------------------------------------------------
>
>                 Key: FLUME-1321
>                 URL: https://issues.apache.org/jira/browse/FLUME-1321
>             Project: Flume
>          Issue Type: Bug
>    Affects Versions: v1.1.0
>            Reporter: Mike Percy
>            Assignee: Roshan Naik
>             Fix For: v1.4.0
>
>         Attachments: 1321.patch.1
>
>
> Currently, BasicTransactionSemantics can throw from close(). This means that exceptions will be clobbered in cases where unexpected exceptions are thrown, since close() is idiomatically called in a finally block.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira