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

Jay Kreps commented on KAFKA-1036:
----------------------------------

I'm a little confused. I don't see any file locking happening in our code. The 
lock I see is just an in-memory lock and should prevent the file from being 
deleted.

So perhaps the problem you are describing is that we don't close the file until 
after the file move? This is legit in unix but perhaps not in windows.
                
> Unable to rename replication offset checkpoint in windows
> ---------------------------------------------------------
>
>                 Key: KAFKA-1036
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1036
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8
>         Environment: windows
>            Reporter: Timothy Chen
>            Priority: Critical
>              Labels: windows
>
> Although there was a fix for checkpoint file renaming in windows that tries 
> to delete the existing checkpoint file if renamed failed, I'm still seeing 
> renaming errors on windows even though the destination file doesn't exist.
> A bit investigation shows that it wasn't able to rename the file since the 
> kafka jvm still holds a fie lock on the tmp file and wasn't able to rename 
> it. 
> Attaching a patch that calls a explict writer.close so it can release the 
> lock and can able to rename it.

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