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

[email protected] commented on FLUME-1089:
------------------------------------------------------



bq.  On 2012-04-10 00:01:17, Arvind Prabhakar wrote:
bq.  > Thanks for the patch Brock. I think what this patch does is forces a 
state transition on close no matter what. This has the potential of covering up 
for programmatic problems that could lead to resource/tx leaks in the system 
which I feel should not happen. If a component is buggy, the other components 
around it should not try to coverup.
bq.  > 
bq.  > Another way to look at it is - the close() method should not throw an 
exception ever. This can be further reinforced by having a thread local 
transaction that is discarded on close.
bq.  
bq.  Brock Noland wrote:
bq.      I can agree with that.
bq.      
bq.      The new code would do the state transition (which means a new 
transaction is gotten on getTransaction()) and then call doClose(). Correct?

My view on it is that there are two parts to this problem:

1. If someone calls close() when the tx is not in the correct state, that 
should fail with an exception. This signals a bad/buggy implementation that 
should be identified aggressively and fixed.

2. If someone calls close() when the tx is in the correct state, that should 
never fail. This will ensure that good code is not penalized for implementation 
issues of the tx provider.


- Arvind


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4655/#review6810
-----------------------------------------------------------


On 2012-04-05 03:05:51, Brock Noland wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4655/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-04-05 03:05:51)
bq.  
bq.  
bq.  Review request for Flume.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Allowing the calling of transaction.close() at any point of time.
bq.  
bq.  
bq.  This addresses bug FLUME-1089.
bq.      https://issues.apache.org/jira/browse/FLUME-1089
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
flume-ng-core/src/main/java/org/apache/flume/channel/BasicTransactionSemantics.java
 403cbca 
bq.    
flume-ng-core/src/test/java/org/apache/flume/channel/TestBasicChannelSemantics.java
 80020fc 
bq.    
flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannelTransaction.java
 bc81f26 
bq.  
bq.  Diff: https://reviews.apache.org/r/4655/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Unit tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Brock
bq.  
bq.


                
> Transaction.close should be safe to call at any point
> -----------------------------------------------------
>
>                 Key: FLUME-1089
>                 URL: https://issues.apache.org/jira/browse/FLUME-1089
>             Project: Flume
>          Issue Type: Improvement
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Brock Noland
>         Attachments: FLUME-1089-0.patch, FLUME-1089-1.patch
>
>
> We are struggling with error handling in regards to transactions. The general 
> consensus is that it should be safe to call close on a transaction at any 
> point.
> Discussion on flume-dev here:
> http://mail-archives.apache.org/mod_mbox/incubator-flume-dev/201203.mbox/%3CCAFukC=5X99U=aOZ5qMR_OoF=pz9f7yhl6ofkyzu08ut4or0...@mail.gmail.com%3E

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to