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

(Updated 2012-02-08 06:47:33.989223)


Review request for Flume.


Changes
-------

This is the diff that does not include the work from FLUME-935 that should be 
committed once that has gone through.

There was a concurrency bug in the unit test which I have now fixed.
I also improved concurrency by introducing a couple of semaphores so that 
threads could wait on data without having to block inside the synchronization 
mechanisms(the patch originally simply didn't block... Which for some usages 
would be rather user-unfriendly


Summary
-------

This is an initial go at fixing the threading issues with memory channel. 

It uses the preliminary work on FLUME-935 and I have included the code from 
that.

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

Anyway, just putting up this early version to see what people think


This addresses bug FLUME-936.
    https://issues.apache.org/jira/browse/FLUME-936


Diffs (updated)
-----

  flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java 
d379b64 
  flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannel.java 
b44030e 
  
flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannelConcurrency.java
 PRE-CREATION 
  
flume-ng-core/src/test/java/org/apache/flume/channel/TestMemoryChannelTransaction.java
 d18045b 
  flume-ng-core/src/test/java/org/apache/flume/source/TestExecSource.java 
46e42e3 
  flume-ng-node/src/test/java/org/apache/flume/source/TestNetcatSource.java 
9e465e1 

Diff: https://reviews.apache.org/r/3704/diff


Testing
-------

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


Thanks,

Juhani

Reply via email to