Apache Lucene open-source search software
Never throttle creation of compound files. (#12070)
Adrien Granda8ef03d97997
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 6017ca66652..fdc9d05734b 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -199,6 +199,9 @@ Improvements* GITHUB#12034: Remove null check in IndexReaderContext#leaves() usages (Erik Pellizzon)+* GITHUB#12070: Compound file creation is no longer subject to merge throttling.+ (Adrien Grand)+Bug Fixes---------------------* GITHUB#11726: Indexing term vectors on large documents could fail due todiff --git a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.javaindex f8a0ab389c9..c089cda0f6f 100644--- a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java+++ b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java@@ -5210,7 +5210,10 @@ public class IndexWritersuccess = false;Collection<String> filesToRemove = merge.info.files();- TrackingDirectoryWrapper trackingCFSDir = new TrackingDirectoryWrapper(mergeDirectory);+ // NOTE: Creation of the CFS file must be performed with the original+ // directory rather than with the merging directory, so that it is not+ // subject to merge throttling.+ TrackingDirectoryWrapper trackingCFSDir = new TrackingDirectoryWrapper(directory);try {createCompoundFile(infoStream, trackingCFSDir, merge.info.info, context, this::deleteNewFiles);