You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Mike Percy (JIRA)" <ji...@apache.org> on 2012/05/21 09:40:42 UTC

[jira] [Commented] (FLUME-1219) Race conditions in BucketWriter / HDFSEventSink

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

Mike Percy commented on FLUME-1219:
-----------------------------------

The reviewboard doesn't seem to be posting to JIRA so here are my comments regarding the patch on RB:

BucketWriter refactoring: append() does all the work of open/close/roll. open() is a private method that takes no arguments. No abort() call. Only one constructor. Far fewer entry points and code paths. I believe I've closed all or many of the race conditions and clarified the API responsibilities/semantics. Also, renaming of the .tmp files works on shutdown.
                
> Race conditions in BucketWriter / HDFSEventSink
> -----------------------------------------------
>
>                 Key: FLUME-1219
>                 URL: https://issues.apache.org/jira/browse/FLUME-1219
>             Project: Flume
>          Issue Type: Bug
>            Reporter: Mike Percy
>            Assignee: Mike Percy
>         Attachments: FLUME-1219-1.patch
>
>
> BucketWriter has several race conditions that came up during my performance testing over the weekend. One issue that caused data loss was the lack of atomic close() and open() semantics related to the "retry" mechanism after the abort() call in HDFSEventSink.process().
> Another issue is the lack of clearly delineated responsibilities for calling open(), flush(), close(), etc. For example, HDFSEventSink.start() calls open(), HDFSEventSink.process() calls and abort() which calls open(), and BucketWriter.append() also calls close() and open().
> There is another race condition related to the JVM shutdown hooks, which cause .tmp files not to be renamed.
> These APIs need to be refactored and their responsibilities need to be clarified.

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