Skip to content

Commit

Permalink
KAFKA-1757 Unmap file prior to delete on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkreps committed Feb 22, 2015
1 parent 62c7e0e commit 3f1e088
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/main/scala/kafka/log/OffsetIndex.scala
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ class OffsetIndex(@volatile var file: File, val baseOffset: Long, val maxIndexSi
*/
def delete(): Boolean = {
info("Deleting index " + this.file.getAbsolutePath)
if(Os.isWindows)
Utils.swallow(forceUnmap(this.mmap))
this.file.delete()
}

Expand Down

0 comments on commit 3f1e088

Please sign in to comment.