FLUME-1184: TestFileChannel.testThreaded fails sometimes
Review Request #5054 - Created May 7, 2012 and submitted
TestFileChannel.testThreaded has a race condition due to FileChannel.FileBackedTransaction not blocking. Sometimes the take threads will find no events on the queue and quit. This patch addresses this issue and additionally addresses a few issues found in the Log class: 1) We are not closing files open for gets() 2) removeOldLogs could be called after the log as been closed by the background thread (identified while fixing #1).
All unit tests pass and the unit test in question passed 1000 times in a row which it had previously failed to do.
Posted (May 7, 2012, 7:23 p.m.)
Thanks for the patch Brock. One comment noted below. If you agree, please address it and update the patch on the Jira for commit.
Review request changed
Updated (Aug. 21, 2012, 3:06 p.m.)
- changed from pending to submitted