[ https://issues.apache.org/jira/browse/KAFKA-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14271737#comment-14271737 ]
Jay Kreps commented on KAFKA-1853: ---------------------------------- Hey [~jaikiran] I am not sure about this change. The file channel should be tied to a file descriptor with one or more file names associated with it. One confusing thing is that java File isn't a file, just a file name (should really be called Path). Changing the file name should have no impact on the file channel at least in my mind. Maybe I am wrong about this? I think there is potentially a bug in that method in that I think it should be {code} def renameTo(f: File): Boolean = { val success = this.file.renameTo(f) if(success) this.file = f success } {code} > Unsuccessful suffix rename attempt of LogSegment can leak files and also > leave the LogSegment in an invalid state > ----------------------------------------------------------------------------------------------------------------- > > Key: KAFKA-1853 > URL: https://issues.apache.org/jira/browse/KAFKA-1853 > Project: Kafka > Issue Type: Bug > Components: core > Affects Versions: 0.8.1.1 > Reporter: jaikiran pai > Fix For: 0.8.3 > > > As noted in this discussion in the user mailing list > http://mail-archives.apache.org/mod_mbox/kafka-users/201501.mbox/%3C54AE3661.8080007%40gmail.com%3E > an unsuccessful attempt at renaming the underlying files of a LogSegment can > lead to file leaks and also leave the LogSegment in an invalid state. -- This message was sent by Atlassian JIRA (v6.3.4#6332)