|
14 | 14 | import org.apache.lucene.store.FSDirectory; |
15 | 15 | import org.apache.lucene.store.FileSwitchDirectory; |
16 | 16 | import org.apache.lucene.store.FilterDirectory; |
17 | | -import org.apache.lucene.store.FilterIndexInput; |
18 | 17 | import org.apache.lucene.store.IOContext; |
19 | 18 | import org.apache.lucene.store.IndexInput; |
20 | 19 | import org.apache.lucene.store.LockFactory; |
|
36 | 35 | import org.elasticsearch.plugins.IndexStorePlugin; |
37 | 36 |
|
38 | 37 | import java.io.IOException; |
39 | | -import java.io.UncheckedIOException; |
40 | 38 | import java.nio.file.Files; |
41 | 39 | import java.nio.file.Path; |
42 | 40 | import java.util.HashSet; |
@@ -224,10 +222,9 @@ static boolean useDelegate(String name, IOContext ioContext) { |
224 | 222 | } |
225 | 223 |
|
226 | 224 | final LuceneFilesExtensions extension = LuceneFilesExtensions.fromExtension(getExtension(name)); |
227 | | - if (extension == null |
228 | | - || extension.shouldMmap() == false |
229 | | - // Force normal read advice for stored field temp fdt files: |
230 | | - // (tmp fdt files should only exist when index sorting is enabled) |
| 225 | + if (extension == null || extension.shouldMmap() == false |
| 226 | + // Force normal read advice for stored field temp fdt files: |
| 227 | + // (tmp fdt files should only exist when index sorting is enabled) |
231 | 228 | || (LuceneFilesExtensions.TMP.getExtension().equals(getExtension(name)) && name.contains("fdt"))) { |
232 | 229 | // Other files are either less performance-sensitive (e.g. stored field index, norms metadata) |
233 | 230 | // or are large and have a random access pattern and mmap leads to page cache trashing |
|
0 commit comments