kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkr...@apache.org
Subject kafka git commit: KAFKA-1757 Unmap file prior to delete on windows.
Date Sun, 22 Feb 2015 05:11:18 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 62c7e0e48 -> 3f1e08822


KAFKA-1757 Unmap file prior to delete on windows.


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/3f1e0882
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/3f1e0882
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/3f1e0882

Branch: refs/heads/trunk
Commit: 3f1e0882297a102843dcd17e05f54ddbedb4882a
Parents: 62c7e0e
Author: Jay Kreps <jay.kreps@gmail.com>
Authored: Sat Feb 21 21:10:28 2015 -0800
Committer: Jay Kreps <jay.kreps@gmail.com>
Committed: Sat Feb 21 21:10:28 2015 -0800

----------------------------------------------------------------------
 core/src/main/scala/kafka/log/OffsetIndex.scala | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/3f1e0882/core/src/main/scala/kafka/log/OffsetIndex.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/log/OffsetIndex.scala b/core/src/main/scala/kafka/log/OffsetIndex.scala
index 1c4c7bd..ca82c04 100644
--- a/core/src/main/scala/kafka/log/OffsetIndex.scala
+++ b/core/src/main/scala/kafka/log/OffsetIndex.scala
@@ -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()
   }
   


Mime
View raw message