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

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



bq.  On 2012-02-21 06:40:54, Arvind Prabhakar wrote:
bq.  > Thanks for the patch Juhani. Can you please rebase it and update the 
review? It is not applying cleanly for MemoryChannel.java. 
bq.  >
bq.  
bq.  Juhani Connolly wrote:
bq.      I just diffed patch-3 and patch-4(from my updated diff below) and they 
appear to be identical.
bq.      Can you paste the output of the failed apply attempt?
bq.  
bq.  Juhani Connolly wrote:
bq.      just to be totally sure, I did a fresh svn checkout/patch and it was 
fine.
bq.      
bq.       1032  mkdir flume
bq.       1033  cd flume
bq.       1034  svn checkout 
https://svn.apache.org/repos/asf/incubator/flume/branches/flume-728/
bq.       1035  cd flume-728/
bq.       1037  patch -p1 < ~/workspace/flume/FLUME-936-4.patch 
bq.       1038  mvn test

Thanks Juhani. I probably did not apply the patch correctly or had some local 
changes at the time that may have caused conflict. Since I do not have the 
workspace now I cannot say for sure what the problem was. However, since the 
patch was committed, chances are there was no problem and it was a pilot error 
on my part. Thanks for making doubly sure of it though.


- Arvind


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


On 2012-02-21 06:51:00, Juhani Connolly wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3704/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-02-21 06:51:00)
bq.  
bq.  
bq.  Review request for Flume.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  This is an initial go at fixing the threading issues with memory channel. 
bq.  
bq.  It uses the preliminary work on FLUME-935 and I have included the code 
from that.
bq.  
bq.  The tagging of the events became unnecessary so I dropped that. One thing 
that concerns me slightly is how to deal with not having enough space in the 
queue to rollback failed takes. One method would be to keep a minimum buffer of 
transactionCapacity. Another would be to implement the queue of queues as 
suggested in FLUME-889
bq.  
bq.  Anyway, just putting up this early version to see what people think
bq.  
bq.  
bq.  This addresses bug FLUME-936.
bq.      https://issues.apache.org/jira/browse/FLUME-936
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java 
6a17f06 
bq.    
flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannel.java 
b44030e 
bq.    
flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannelConcurrency.java
 PRE-CREATION 
bq.    
flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannelTransaction.java
 d18045b 
bq.    flume-ng-core/src/test/java/org/apache/flume/source/TestExecSource.java 
3014368 
bq.    
flume-ng-node/src/test/java/org/apache/flume/source/TestNetcatSource.java 
9e465e1 
bq.  
bq.  Diff: https://reviews.apache.org/r/3704/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  The original tests pass, though I had to take out the state checks because 
of the changes to semantics from the flume-935 code. I also had to add a 
transaction.close statement where semantics were not properly being followed
bq.  I have to retrofit my new concurrency test since without the tagged events 
it cannot fail without checking that the content is correct. I'll put that up 
asap, just wanted to get some eyes on this before I head out.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Juhani
bq.  
bq.


                
> MemoryChannel is not thread safe
> --------------------------------
>
>                 Key: FLUME-936
>                 URL: https://issues.apache.org/jira/browse/FLUME-936
>             Project: Flume
>          Issue Type: Bug
>          Components: Channel
>    Affects Versions: NG alpha 2
>            Reporter: Juhani Connolly
>            Assignee: Juhani Connolly
>             Fix For: v1.1.0
>
>         Attachments: FLUME-936-3.patch, FLUME-936-4.patch, 
> FLUME-936-unittest.patch
>
>
> The memory channel isn't thread safe as a couple of parallel transactions can 
> commit/rollback each others entries if called in the wrong order.
> I'm attaching a unit test I made that demonstrates it using a cyclicbarrier 
> to force the event order that causes the precondition to fail.

--
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