Skip to content

Commit 9c3f586

Browse files
committed
Force normal read advice for stored field temp fdt files
1 parent d487eb5 commit 9c3f586

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ public IndexInput openInput(String name, IOContext context) throws IOException {
181181
// we might run into trouble with files that are pendingDelete in one directory but still
182182
// listed in listAll() from the other. We on the other hand don't want to list files from both dirs
183183
// and intersect for perf reasons.
184+
185+
// Force normal read advice for stored field temp fdt files:
186+
// (tmp fdt files should only exist when index sorting is enabled)
187+
if (LuceneFilesExtensions.TMP.getExtension().equals(getExtension(name)) && name.contains("fdt")) {
188+
context = context.withReadAdvice(ReadAdvice.NORMAL);
189+
}
190+
184191
return delegate.openInput(name, context);
185192
} else {
186193
return super.openInput(name, context);

0 commit comments

Comments
 (0)