[
https://issues.apache.org/jira/browse/OAK-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15256042#comment-15256042
]
Michael Dürig commented on OAK-4274:
------------------------------------
This might turn out to be worse than unmapping being deferred by JVM gc: client
code holding a reference to a record "forever" will keep the containing tar
file mapped, although the underlying segment might have been gc'ed already by
revision gc.
OTOH I don't think this is a problem re. memory consumption as the underlying
OS will simply swap the actual memory content out. It might be a problem re.
number of file handles. Definitely something to keep an eye on. Maybe
[~jsedding]'s proposal with the phantom references gives us a way to better
monitor this!?
> Memory-mapped files can't be explicitly unmapped
> ------------------------------------------------
>
> Key: OAK-4274
> URL: https://issues.apache.org/jira/browse/OAK-4274
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: segment-next, segmentmk
> Reporter: Francesco Mari
> Labels: gc, resilience
> Fix For: 1.6
>
>
> As described by [this JDK
> bug|http://bugs.java.com/view_bug.do?bug_id=4724038], there is no way to
> explicitly unmap memory mapped files. A memory mapped file is unmapped only
> if the corresponding {{MappedByteBuffer}} is garbage collected by the JVM.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)