[ 
https://issues.apache.org/jira/browse/OAK-3501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14950171#comment-14950171
 ] 

Michael Dürig commented on OAK-3501:
------------------------------------

I'm a bit worried about the {{closed}} flag. Automatically "closing" a map that 
becomes empty isn't reflected through the {{PatialCompactionMap}} contract. 
Maybe we could tackle this a bit differently instead and not persist the map at 
all in {{compress()}} once it becomes empty but instead just set {{entries == 
null}}. This will save us a bit of IO on top of releasing the references to the 
previous maps. The {{PatialCompactionMap}} itself will still remain in 
{{CompactionMap.map}} though until the next compaction cycle. This shouldn't be 
a problem as it is now very shallow. 

> PersistedCompactionMap could release reference to records early
> ---------------------------------------------------------------
>
>                 Key: OAK-3501
>                 URL: https://issues.apache.org/jira/browse/OAK-3501
>             Project: Jackrabbit Oak
>          Issue Type: Technical task
>          Components: segmentmk
>            Reporter: Alex Parvulescu
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: OAK-3501.patch
>
>
> Whenever a PersistedCompactionMap becomes empty it will be eventually dropped 
> from the compaction maps chain. this will happen on the next compaction 
> cycle, which happens post-cleanup. so we're potentially keeping a reference 
> to some collectable garbage for up to 2 cycles.
> I'd like to propose a patch that allows for eagerly nullifying the reference 
> to the records, making this interval shorter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to