Skip to content

Commit

Permalink
Also mmap terms index (.tip) files for hybridfs (#43150)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jimczi committed Jun 12, 2019
1 parent 5c50f3b commit ef8f90c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ boolean useDelegate(String name) {
case "nvd":
case "dvd":
case "tim":
case "tip":
case "cfs":
return true;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public void testPreload() throws IOException {
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();
Expand Down

0 comments on commit ef8f90c

Please sign in to comment.