[
https://issues.apache.org/jira/browse/FLUME-1593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459226#comment-13459226
]
Brock Noland commented on FLUME-1593:
-------------------------------------
I do not see a difference between writeToLogFile and the one in the patch
except that the patch uses an inner class. It seems that is what you are not
keen on?
1) We should not be logging an exception in the case that the log file was
closed or exceeded the max size. This could be addressed with a simple
instanceof in the writeToLogFile catch statement and an exception class
indicating a close/exceeded max size, like the patch has.
2) The problem with writeToLogFile is that put returns something and the other
functions do not, an inner class is required because of the different return
types.
> FileChannel race condition when log file rolls
> ----------------------------------------------
>
> Key: FLUME-1593
> URL: https://issues.apache.org/jira/browse/FLUME-1593
> Project: Flume
> Issue Type: Improvement
> Components: Channel
> Affects Versions: v1.3.0
> Reporter: Brock Noland
> Assignee: Brock Noland
> Priority: Minor
> Attachments: FLUME-1593-0.patch
>
>
> There is a non-harmful race condition when we roll a log. One thread can call
> logFiles.get(logFileIndex).{take,put,etc} while another is closing that log
> writer.
--
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