[
https://issues.apache.org/jira/browse/FLUME-1593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459152#comment-13459152
]
Brock Noland edited comment on FLUME-1593 at 9/20/12 9:03 AM:
--------------------------------------------------------------
Yes that is the correct description of the problem. Today this is being handled
via retry, but at a higher level. If we don't want to introduce excessive
locking, we are going to have to retry. The try/catch mechanism you suggest is
a retry. As such, my guess is that you dislike the loop? That is fine, we can
do something like this:
{noformat}
try {
doSomething();
} catch(RetryableException e) {
rollIfStillNeeded(); // this handles the file exceeding the max length which
I'd like to put in as well
doSomething();
}
{noformat}
Does that sound good to you?
was (Author: brocknoland):
Yes that is the correct description of the problem. Today this is being
handled via retry, but at a higher level. If we don't want to introduce
excessive locking, we are going to have to retry. The try/catch mechanism you
suggest is a retry. As such, my guess is that you dislike the loop? That is
fine, we can do something like this:
try {
doSomething();
} catch(RetryableException e) {
rollIfStillNeeded(); // this handles the file exceeding the max length which
I'd like to put in as well
doSomething();
}
Does that sound good to you?
> 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