Skip to content

Commit ef8f90c

Browse files
authored
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.
1 parent 5c50f3b commit ef8f90c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

server/src/main/java/org/elasticsearch/index/store/FsDirectoryFactory.java

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ boolean useDelegate(String name) {
157157
case "nvd":
158158
case "dvd":
159159
case "tim":
160+
case "tip":
160161
case "cfs":
161162
return true;
162163
default:

server/src/test/java/org/elasticsearch/index/store/FsDirectoryFactoryTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public void testPreload() throws IOException {
6161
assertTrue(hybridDirectory.useDelegate("foo.dvd"));
6262
assertTrue(hybridDirectory.useDelegate("foo.nvd"));
6363
assertTrue(hybridDirectory.useDelegate("foo.tim"));
64+
assertTrue(hybridDirectory.useDelegate("foo.tip"));
6465
assertTrue(hybridDirectory.useDelegate("foo.cfs"));
6566
assertFalse(hybridDirectory.useDelegate("foo.bar"));
6667
MMapDirectory delegate = hybridDirectory.getDelegate();

0 commit comments

Comments
 (0)