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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to