Also mmap terms index (`.tip`) files for hybridfs (#43150)

This change adds the terms index (`.tip`) to the list of extensions
that are memory-mapped by hybridfs. These files used to be accessed
only once to load the terms index on-heap but since #42838 they can
now be used to read the binary FST directly so it is benefical to
memory-map them instead of accessing them via NIO.
This commit is contained in:
Jim Ferenczi 2019-06-12 20:52:57 +02:00 committed by jimczi
parent 51618af056
commit 6cfed7ec72
2 changed files with 2 additions and 0 deletions

View File

@ -157,6 +157,7 @@ public class FsDirectoryFactory implements IndexStorePlugin.DirectoryFactory {
case "nvd":
case "dvd":
case "tim":
case "tip":
case "cfs":
return true;
default:

View File

@ -61,6 +61,7 @@ public class FsDirectoryFactoryTests extends ESTestCase {
assertTrue(hybridDirectory.useDelegate("foo.dvd"));
assertTrue(hybridDirectory.useDelegate("foo.nvd"));
assertTrue(hybridDirectory.useDelegate("foo.tim"));
assertTrue(hybridDirectory.useDelegate("foo.tip"));
assertTrue(hybridDirectory.useDelegate("foo.cfs"));
assertFalse(hybridDirectory.useDelegate("foo.bar"));
MMapDirectory delegate = hybridDirectory.getDelegate();