You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Tom <lu...@zvents.com> on 2006/03/23 02:47:54 UTC

MMapDirectory on Windows Broken?

Hi -

I just tried MMapDirectory on windows, running the app I use to 
populate my index, and it fairly quickly dies. Does it work for 
anyone? Same code works fine with FSDirectory on Windows, or on Linux with MM.

I get:

      [java] Constructing lucene index in ./test_repos
      [java] Canon: C:\Documents and 
Settings\Tom\workspace\LuceneWar\test_repos
      [java] Using dir of class: org.apache.lucene.store.MMapDirectory
      [java] Inserted 8 users in: 47 millis
      [java] Exception in thread "main" java.io.IOException: Cannot 
delete C:\Documents and Settings\Tom\workspace\LuceneWar\test_repos\deletable
      [java] 	at 
org.apache.lucene.store.FSDirectory.renameFile(FSDirectory.java:265)
      [java] 	at 
org.apache.lucene.index.IndexWriter.writeDeleteableFiles(IndexWriter.java:797)
      [java] 	at 
org.apache.lucene.index.IndexWriter.deleteSegments(IndexWriter.java:741)
      [java] 	at 
org.apache.lucene.index.IndexWriter.access$200(IndexWriter.java:59)
      [java] 	at 
org.apache.lucene.index.IndexWriter$4.doBody(IndexWriter.java:699)
      [java] 	at org.apache.lucene.store.Lock$With.run(Lock.java:109)
      [java] 	at 
org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:696)
      [java] 	at 
org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:658)
      [java] 	at 
org.apache.lucene.index.IndexWriter.maybeMergeSegments(IndexWriter.java:646)
      [java] 	at 
org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:453)
      [java] 	at 
org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:436)
...

Just as a guess, it's a manifestation of a bug in java 
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4715154, where 
they don't unmap the file.

There's mention of a workaround here, FWIW.

http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=24ab5731b5fe7756d054f6bc7b921:WuuT?bug_id=4829325

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org