mirror of https://github.com/apache/lucene.git
LUCENE-3198: use MMapDir by default (in FSDir.open) on Linux, 64 bit JRE
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1135650 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0ae7396314
commit
8170f59839
|
@ -482,6 +482,11 @@ Changes in runtime behavior
|
|||
|
||||
* LUCENE-3146: IndexReader.setNorm throws IllegalStateException if the field
|
||||
does not store norms. (Shai Erera, Mike McCandless)
|
||||
|
||||
* LUCENE-3198: On Linux, if the JRE is 64 bit and supports unmapping,
|
||||
FSDirectory.open now defaults to MMapDirectory instead of
|
||||
NIOFSDirectory since MMapDirectory gives better performance. (Mike
|
||||
McCandless)
|
||||
|
||||
* LUCENE-3200: MMapDirectory now uses chunk sizes that are powers of 2.
|
||||
When setting the chunk size, it is rounded down to the next possible
|
||||
|
|
|
@ -173,7 +173,7 @@ public abstract class FSDirectory extends Directory {
|
|||
/** Just like {@link #open(File)}, but allows you to
|
||||
* also specify a custom {@link LockFactory}. */
|
||||
public static FSDirectory open(File path, LockFactory lockFactory) throws IOException {
|
||||
if ((Constants.WINDOWS || Constants.SUN_OS)
|
||||
if ((Constants.WINDOWS || Constants.SUN_OS || Constants.LINUX)
|
||||
&& Constants.JRE_IS_64BIT && MMapDirectory.UNMAP_SUPPORTED) {
|
||||
return new MMapDirectory(path, lockFactory);
|
||||
} else if (Constants.WINDOWS) {
|
||||
|
|
Loading…
Reference in New Issue