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

Prasad Mujumdar commented on FLUME-936:
---------------------------------------

The original implementation was addressing a single pushing events into the 
channel. Adding events directly into the shared queue with multiple sources 
would make it unnecessarily complicated. Keeping the new events local to the  
transaction make it much simpler.
The transactions are already thread local and has local event queues (used for 
undo), though I guess using the common threadlocal transaction would be better 
..

Juhani, if you are planning to fix it, please go ahead. Otherwise I can pick it 
up.
                
> 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
>             Fix For: v1.1.0
>
>         Attachments: 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