apache/lucenenet — pull request #38 by laimis (2014-12-31 17:49:28+00:00)
Title: open and access memory mapped file in read mode

~80 tests failed with UnauthorizedAccessException : Access to the path is denied. that point to MMapDirectory.Map call and how it accesses the MemoryMappedFile. Looks like we need to be explicit with "Read" flag when we open it and read from memory mapped files.

(Java version also accesses the file in MMapDirectory in Read Only mode: https://github.com/apache/lucene-solr/blob/lucene_solr_4_8_0/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java)

I don't expect this commit to fix all of those tests as once the code gets passed the access denied it runs into other errors (e.g. timeout), but it gets us moving forward.