<freeStyleBuild _class='hudson.model.FreeStyleBuild'><action _class='hudson.model.CauseAction'><cause _class='hudson.triggers.TimerTrigger$TimerTriggerCause'><shortDescription>Started by timer</shortDescription></cause></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><refsremotesoriginmain _class='hudson.plugins.git.util.Build'><buildNumber>6215</buildNumber><marked><SHA1>f94888d85c129fdd71d27790164c613dfb617704</SHA1><branch><SHA1>f94888d85c129fdd71d27790164c613dfb617704</SHA1><name>refs/remotes/origin/main</name></branch></marked><revision><SHA1>f94888d85c129fdd71d27790164c613dfb617704</SHA1><branch><SHA1>f94888d85c129fdd71d27790164c613dfb617704</SHA1><name>refs/remotes/origin/main</name></branch></revision></refsremotesoriginmain></buildsByBranchName><lastBuiltRevision><SHA1>f94888d85c129fdd71d27790164c613dfb617704</SHA1><branch><SHA1>f94888d85c129fdd71d27790164c613dfb617704</SHA1><name>refs/remotes/origin/main</name></branch></lastBuiltRevision><remoteUrl>https://gitbox.apache.org/repos/asf/lucene.git</remoteUrl><scmName></scmName></action><action></action><action></action><action _class='hudson.model.ParametersAction'></action><action _class='hudson.tasks.junit.TestResultAction'><failCount>0</failCount><skipCount>817</skipCount><totalCount>18419</totalCount><urlName>testReport</urlName></action><action></action><action></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'></action><building>false</building><description>Java: 64bit/hotspot/jdk-25.0.3 -XX:-UseCompressedOops -XX:+UseParallelGC</description><displayName>#6215</displayName><duration>792443</duration><estimatedDuration>766667</estimatedDuration><fullDisplayName>Lucene-MMAPv2-Linux #6215</fullDisplayName><id>6215</id><inProgress>false</inProgress><keepLog>false</keepLog><number>6215</number><queueId>236107</queueId><result>SUCCESS</result><timestamp>1791712140435</timestamp><url>https://jenkins.thetaphi.de/view/Lucene/job/Lucene-MMAPv2-Linux/6215/</url><builtOn></builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseCompoundFormatTestCase.java</affectedPath><affectedPath>lucene/CHANGES.txt</affectedPath><affectedPath>lucene/core/src/test/org/apache/lucene/codecs/lucene90/TestLucene90CompoundFormat.java</affectedPath><affectedPath>lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90CompoundReader.java</affectedPath><affectedPath>lucene/core/src/test/org/apache/lucene/codecs/lucene99/TestVectorsMergeReadAdvice.java</affectedPath><commitId>f94888d85c129fdd71d27790164c613dfb617704</commitId><timestamp>1791707402000</timestamp><author><absoluteUrl>https://jenkins.thetaphi.de/user/noreply</absoluteUrl><fullName>noreply</fullName></author><authorEmail>noreply@github.com</authorEmail><comment>Merges read compound files through a mapping of their own (#16796)

Since #16749 and #16684, a merge reads raw vectors and stored fields through a mapping it opens for itself, so the sequential access it advises does not replace the random access advised for searches. Inside a compound file this does not hold: the reader opens the inner file again through the compound reader, which slices the one mapping of the `.cfs` that searches read. The merge's advice lands on the pages searches read, and nothing restores it after the merge.

`Lucene90CompoundReader` now opens inner files for a merge (an `IOContext` whose context is `MERGE`) through a second mapping of the compound file. The first merge open maps it, later merge opens share it, and it is closed with the reader. Like the mapping searches read, it is opened without advice, so each inner file is advised on its own region, from the context it was opened with. If the compound file is gone, merge opens fall back to the reader's mapping.

Other opens are unchanged. A reader opened only for a merge maps the compound file once more in total.

`BaseCompoundFormatTestCase#testManySubFiles` asserted one file handle per compound file. It now allows one more once an inner file is opened for a merge.

Tests:
- `TestLucene90CompoundFormat`: merge opens share one mapping of their own, separate from the reader's, closed with the reader; the fallback when the file is gone; and, on `MMapDirectory`, searches keep reading the reader's mapping while a merge reads another.
- `TestVectorsMergeReadAdvice#testACompoundMergeOpensItsOwnMapping`: a merge of two compound segments maps each source compound file once, without advice, and closes the mapping with the segment's reader.

Relates #16749, #16769, #16684
</comment><date>2026-10-11 10:30:02 +0200</date><id>f94888d85c129fdd71d27790164c613dfb617704</id><msg>Merges read compound files through a mapping of their own (#16796)</msg><path><editType>edit</editType><file>lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90CompoundReader.java</file></path><path><editType>edit</editType><file>lucene/test-framework/src/java/org/apache/lucene/tests/index/BaseCompoundFormatTestCase.java</file></path><path><editType>edit</editType><file>lucene/core/src/test/org/apache/lucene/codecs/lucene99/TestVectorsMergeReadAdvice.java</file></path><path><editType>edit</editType><file>lucene/CHANGES.txt</file></path><path><editType>edit</editType><file>lucene/core/src/test/org/apache/lucene/codecs/lucene90/TestLucene90CompoundFormat.java</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.thetaphi.de/user/noreply</absoluteUrl><fullName>noreply</fullName></culprit></freeStyleBuild>