[ 
https://issues.apache.org/jira/browse/OAK-3139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Dürig updated OAK-3139:
-------------------------------
    Attachment: OAK-3139.patch

Patch with a POC for a potential fix. [~alex.parvulescu], WDYT of the general 
approach? The idea is to have a new segment type (compaction map), which would 
not get gc'ed with CLEAN_OLD to prevent old entries in the compaction map from 
getting lost. The patch needs a lot of cleaning up still. Just wanted to check 
with you whether you'd agree on the general direction or whether we should look 
for another approach. 

> SNFE in persisted comapation map when using CLEAN_OLD
> -----------------------------------------------------
>
>                 Key: OAK-3139
>                 URL: https://issues.apache.org/jira/browse/OAK-3139
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segmentmk
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>            Priority: Critical
>              Labels: compaction, gc
>             Fix For: 1.3.4
>
>         Attachments: OAK-3139.patch
>
>
> When using {{CLEAN_OLD}} it might happen that segments of the persisted 
> compaction map get collected. The reason for this is that only the segment 
> containing the root of the map is pinned ({{SegmentId#pin}}), leaving other 
> segments of the compaction map eligible for collection once old enough. 
> {noformat}
> org.apache.jackrabbit.oak.plugins.segment.SegmentNotFoundException: Segment 
> 95cbb3e2-3a8c-4976-ae5b-6322ff102731 not found
>         at 
> org.apache.jackrabbit.oak.plugins.segment.file.FileStore.readSegment(FileStore.java:919)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.SegmentTracker.getSegment(SegmentTracker.java:134)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.SegmentId.getSegment(SegmentId.java:108)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.Record.getSegment(Record.java:82)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.MapRecord.getEntry(MapRecord.java:154)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.MapRecord.getEntry(MapRecord.java:186)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.PersistedCompactionMap.get(PersistedCompactionMap.java:118)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.PersistedCompactionMap.get(PersistedCompactionMap.java:100)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.CompactionMap.get(CompactionMap.java:93)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.uncompact(SegmentWriter.java:1023)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeNode(SegmentWriter.java:1033)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeBuilder.getNodeState(SegmentNodeBuilder.java:100)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.<init>(SegmentNodeStore.java:418)
>         at 
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore.merge(SegmentNodeStore.java:204)
> {noformat}



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

Reply via email to