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

Hari Shreedharan commented on FLUME-1917:
-----------------------------------------

Reading that comment again, I guess I could make it clearer. Step-by-step, with 
this patch:
thread-1 commit - lastSyncOffset = 0, lastCommitOffset = t-1 cOffset
thread-2 commit - lastSyncOffset = 0, lastCommitOffset = t-2 cOffset (t-2 
cOffset > t-1 cOffset)
thread-2 sync - lastSyncOffset = t-2 cOffset, lastCommitOffset = t-2 cOffset 
(fsync, since t-2 cOffset > 0)
thread-3 commit - lastSyncOffset = t-2 cOffset, lastCommitOffset = t-3 cOffset 
(now t-3 cOffset > t-2 cOffset)
thread-1 sync - lastSyncOffset = t-3 cOffset, lastCommitOffset = t-3 cOffset 
(fsync, since t-3 cOffset > t-2 cOffset)
thread-3 sync - lastSyncOffset = t-3 cOffset, lastCommitOffset = t-3 cOffset 
(no-op, since t-3 cOffset == t-3 cOffset).

So the idea of group commit works fine, just that the fsync happens in a 
different thread than the one that wrote to the last offset. I don't think that 
is an issue since the total number of fsyncs is 2 as expected.
                
> FileChannel group commit (coalesce fsync)
> -----------------------------------------
>
>                 Key: FLUME-1917
>                 URL: https://issues.apache.org/jira/browse/FLUME-1917
>             Project: Flume
>          Issue Type: Bug
>          Components: File Channel
>            Reporter: Hari Shreedharan
>            Assignee: Hari Shreedharan
>         Attachments: FLUME-1917.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to