From 2ab88e21dcfeccfa1dd5ff734d1094d5de06f6b7 Mon Sep 17 00:00:00 2001 From: Daniel Mitterdorfer Date: Fri, 15 Feb 2019 13:08:27 +0100 Subject: [PATCH] Also mmap cfs files for hybridfs (#38940) With this commit we add the `.cfs` file extension to the list of file types that are memory-mapped by hybridfs. `.cfs` files combine all files of a Lucene segment into a single file in order to save file handles. As this strategy is only used for "small" segments (less than 10% of the shard size), it is benefical to memory-map them instead of accessing them via NIO. Relates #36668 --- .../java/org/elasticsearch/index/store/FsDirectoryService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/main/java/org/elasticsearch/index/store/FsDirectoryService.java b/server/src/main/java/org/elasticsearch/index/store/FsDirectoryService.java index badf981803603..a8b50fcc53895 100644 --- a/server/src/main/java/org/elasticsearch/index/store/FsDirectoryService.java +++ b/server/src/main/java/org/elasticsearch/index/store/FsDirectoryService.java @@ -144,6 +144,7 @@ public IndexInput openInput(String name, IOContext context) throws IOException { case "nvd": case "dvd": case "tim": + case "cfs": // we need to do these checks on the outer directory since the inner doesn't know about pending deletes ensureOpen(); ensureCanRead(name);