<freeStyleBuild _class='hudson.model.FreeStyleBuild'><action _class='hudson.model.CauseAction'><cause _class='hudson.model.Cause$UpstreamCause'><shortDescription>Started by upstream project "Lucene-main-Windows" build number 21,471</shortDescription><upstreamBuild>21471</upstreamBuild><upstreamProject>Lucene-main-Windows</upstreamProject><upstreamUrl>job/Lucene-main-Windows/</upstreamUrl></cause></action><action></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><refsremotesoriginbranch_10_6 _class='hudson.plugins.git.util.Build'><buildNumber>3</buildNumber><marked><SHA1>6dde6c73bd1c43f1e0496f46be2bc6d6141a3fd4</SHA1><branch><SHA1>6dde6c73bd1c43f1e0496f46be2bc6d6141a3fd4</SHA1><name>refs/remotes/origin/branch_10_6</name></branch></marked><revision><SHA1>6dde6c73bd1c43f1e0496f46be2bc6d6141a3fd4</SHA1><branch><SHA1>6dde6c73bd1c43f1e0496f46be2bc6d6141a3fd4</SHA1><name>refs/remotes/origin/branch_10_6</name></branch></revision></refsremotesoriginbranch_10_6></buildsByBranchName><lastBuiltRevision><SHA1>6dde6c73bd1c43f1e0496f46be2bc6d6141a3fd4</SHA1><branch><SHA1>6dde6c73bd1c43f1e0496f46be2bc6d6141a3fd4</SHA1><name>refs/remotes/origin/branch_10_6</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>1493</skipCount><totalCount>20315</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-21.0.12 -XX:-UseCompressedOops -XX:+UseG1GC</description><displayName>#3</displayName><duration>948494</duration><estimatedDuration>948494</estimatedDuration><fullDisplayName>Lucene-10.6-macOS #3</fullDisplayName><id>3</id><inProgress>false</inProgress><keepLog>false</keepLog><number>3</number><queueId>238748</queueId><result>SUCCESS</result><timestamp>1793279685676</timestamp><url>https://jenkins.thetaphi.de/view/Lucene/job/Lucene-10.6-macOS/3/</url><builtOn>macOS VM</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java</affectedPath><affectedPath>lucene/CHANGES.txt</affectedPath><affectedPath>lucene/core/src/java21/org/apache/lucene/store/RefCountedSharedArena.java</affectedPath><affectedPath>lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInputProvider.java</affectedPath><commitId>6dde6c73bd1c43f1e0496f46be2bc6d6141a3fd4</commitId><timestamp>1793276919000</timestamp><author><absoluteUrl>https://jenkins.thetaphi.de/user/noreply</absoluteUrl><fullName>noreply</fullName></author><authorEmail>noreply@github.com</authorEmail><comment>[10.6.1] Fix MMapDirectory shared arena grouping being lost when an old arena closes (#16945)

MMapDirectory groups the files of a segment into one reference counted shared arena. When an arena runs out of permits, or is already closing, a newer arena for the same group replaces it in the arenas map. The old arena stays alive until its inputs are closed. When it finally closes, it calls arenas.remove(key), which removes whatever is mapped to that key, so it evicted the newer live arena. Later opens of that group could not find it and created more arenas than needed.

I changed RefCountedSharedArena to pass itself to its onClose callback, and MMapDirectory now calls arenas.remove(key, arena). The entry is removed only if it still points to the closing arena. Nothing else changes: memory is still unmapped when the last input of an arena is closed, whether or not the arena is in the map.

This is a performance issue only. No arenas or mappings are leaked. Files in a group just may not share an arena, so more arenas are created and closed.
</comment><date>2026-10-29 12:28:39 +0000</date><id>6dde6c73bd1c43f1e0496f46be2bc6d6141a3fd4</id><msg>[10.6.1] Fix MMapDirectory shared arena grouping being lost when an old arena closes (#16945)</msg><path><editType>edit</editType><file>lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInputProvider.java</file></path><path><editType>edit</editType><file>lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java</file></path><path><editType>edit</editType><file>lucene/CHANGES.txt</file></path><path><editType>edit</editType><file>lucene/core/src/java21/org/apache/lucene/store/RefCountedSharedArena.java</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://jenkins.thetaphi.de/user/noreply</absoluteUrl><fullName>noreply</fullName></culprit></freeStyleBuild>