From 145adf6fac71c4ec597887a0fac29a21af8ce449 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 30 Jun 2025 09:23:38 +0200 Subject: [PATCH 1/4] Remove tmp_fdt_no_mmap feature flag. After running this change for a week, no regressions where detected in nightly benchmarks that use index sorting. --- .../org/elasticsearch/index/store/FsDirectoryFactory.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/index/store/FsDirectoryFactory.java b/server/src/main/java/org/elasticsearch/index/store/FsDirectoryFactory.java index d4ec647b992b5..39a5c03e27942 100644 --- a/server/src/main/java/org/elasticsearch/index/store/FsDirectoryFactory.java +++ b/server/src/main/java/org/elasticsearch/index/store/FsDirectoryFactory.java @@ -46,7 +46,6 @@ public class FsDirectoryFactory implements IndexStorePlugin.DirectoryFactory { private static final Logger Log = LogManager.getLogger(FsDirectoryFactory.class); private static final FeatureFlag MADV_RANDOM_FEATURE_FLAG = new FeatureFlag("madv_random"); - private static final FeatureFlag TMP_FDT_NO_MMAP_FEATURE_FLAG = new FeatureFlag("tmp_fdt_no_mmap"); public static final Setting INDEX_LOCK_FACTOR_SETTING = new Setting<>("index.store.fs.fs_lock", "native", (s) -> { return switch (s) { @@ -261,8 +260,7 @@ static boolean useDelegate(String name, IOContext ioContext) { * @return whether to avoid using delegate if the file is a tmp fdt file. */ static boolean avoidDelegateForFdtTempFiles(String name, LuceneFilesExtensions extension) { - // NOTE, for now gated behind feature flag to observe impact of this change in benchmarks only: - return TMP_FDT_NO_MMAP_FEATURE_FLAG.isEnabled() && extension == LuceneFilesExtensions.TMP && name.contains("fdt"); + return extension == LuceneFilesExtensions.TMP && name.contains("fdt"); } MMapDirectory getDelegate() { From 098a7d21fef986d52e751671c52481bb124c2d73 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 30 Jun 2025 09:26:30 +0200 Subject: [PATCH 2/4] Update docs/changelog/130308.yaml --- docs/changelog/130308.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/changelog/130308.yaml diff --git a/docs/changelog/130308.yaml b/docs/changelog/130308.yaml new file mode 100644 index 0000000000000..14d63429e5bb0 --- /dev/null +++ b/docs/changelog/130308.yaml @@ -0,0 +1,5 @@ +pr: 130308 +summary: Remove `tmp_fdt_no_mmap` feature flag +area: Logs +type: bug +issues: [] From 80aa7013169da5af1efaabfb06d2ace27e047a62 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 30 Jun 2025 09:29:07 +0200 Subject: [PATCH 3/4] unmute test, that got muted because release tests didn't know about this ff. --- muted-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index ee13681a241a9..1fbc5b4241925 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -533,9 +533,6 @@ tests: - class: org.elasticsearch.qa.verify_version_constants.VerifyVersionConstantsIT method: testLuceneVersionConstant issue: https://github.com/elastic/elasticsearch/issues/125638 -- class: org.elasticsearch.index.store.FsDirectoryFactoryTests - method: testPreload - issue: https://github.com/elastic/elasticsearch/issues/129852 - class: org.elasticsearch.xpack.rank.rrf.RRFRankClientYamlTestSuiteIT method: test {yaml=rrf/950_pinned_interaction/rrf with pinned retriever as a sub-retriever} issue: https://github.com/elastic/elasticsearch/issues/129845 From 73c77d9745184aae91303ed239d466540e62dfc4 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 30 Jun 2025 09:30:49 +0200 Subject: [PATCH 4/4] iter --- docs/changelog/130308.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog/130308.yaml b/docs/changelog/130308.yaml index 14d63429e5bb0..f9386593744f1 100644 --- a/docs/changelog/130308.yaml +++ b/docs/changelog/130308.yaml @@ -1,5 +1,5 @@ pr: 130308 -summary: Remove `tmp_fdt_no_mmap` feature flag +summary: Force niofs for fdt tmp file read access when flushing stored fields area: Logs type: bug issues: []