You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chukwa.apache.org by "Jerome Boulon (JIRA)" <ji...@apache.org> on 2009/04/03 18:38:13 UTC

[jira] Commented: (CHUKWA-68) Race condition could stop log file streaming

    [ https://issues.apache.org/jira/browse/CHUKWA-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695482#action_12695482 ] 

Jerome Boulon commented on CHUKWA-68:
-------------------------------------

Hi,
Not sure to understand correctly because TerminatorThread is not doing any unregister, so "04:20 Terminator Thread finished the log file, unregister name node log for streaming." is not possible.



If Name node send at 04:01 Shutdown Name Node, 
then the agent process the command, the result is :
---> remove this adaptor from the list of adaptors
---> At this point any request to add the same log file should succeed, because for the agent, this adaptor doesn't exist.

So, if "04:03 Register of namenode log file failed" it should not be because of the terminatorThread or we have a bug

-- a call to adaptor.shutdown
Then adaptor.shutdown will start the TerminatorThread
Assuming the NameLog keep writing to the log file, TerminatorThread will stop 10 minutes later.

So do you have a real case where you have seen this?



> Race condition could stop log file streaming
> --------------------------------------------
>
>                 Key: CHUKWA-68
>                 URL: https://issues.apache.org/jira/browse/CHUKWA-68
>             Project: Hadoop Chukwa
>          Issue Type: Bug
>         Environment: Redhat 5.1, Java 6
>            Reporter: Eric Yang
>            Priority: Blocker
>
> When log file is actively writing with log4j appender, and fileTailingAdaptor is behind.  There is a possibility that restart the java program might stop log file streaming.
> Here is an example of what could go wrong:
> 04:01 Shutdown Name Node.
> 04:01 Terminator Thread kick in and streaming the remaining log.
> 04:02 Name Node Started up
> 04:03 Register of namenode log file failed because it is already streaming.
> 04:20 Terminator Thread finished the log file, unregister name node log for streaming.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.