You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2013/12/02 16:03:37 UTC

[jira] [Commented] (OAK-1250) Guard against invalid/missing checkpoints

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

Jukka Zitting commented on OAK-1250:
------------------------------------

Currently the {{checkpoint()}} method just returns the raw record ID of the head revision. A better solution (which is already anticipated by the super-root node used by the {{SegmentNodeStore}}) would be to generate a random UUID for each checkpoint, and store the latest head along with the expiration time of the checkpoint as an extra child below the super-root. Then the {{retrieve()}} method can look up the checkpoint UUID from the super-root, and return the relevant state if it does exists. That'll also work nicely with garbage collection once we implement it for the SegmentMK.

> Guard against invalid/missing checkpoints
> -----------------------------------------
>
>                 Key: OAK-1250
>                 URL: https://issues.apache.org/jira/browse/OAK-1250
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segmentmk
>            Reporter: Alex Parvulescu
>
> Playing with the backup revealed a case where a checkpoint can become invalid after a manual restore of the repository. [0]
> The NodeStore#retrieve apis already specify that this can return null in the case the checkpoint doesn't exist anymore, but it looks like the storage bits aren't yet prepared for that scenario.
> [0]
> {noformat}
> org.apache.sling.commons.scheduler.impl.QuartzScheduler Exception during job execution of org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate@3a6d47 : Failed to load segment 8a8b281c-1a02-4950-aad5-aad8e436a0d8
> java.lang.IllegalStateException: Failed to load segment 8a8b281c-1a02-4950-aad5-aad8e436a0d8
> 	at org.apache.jackrabbit.oak.plugins.segment.AbstractStore.readSegment(AbstractStore.java:109) ~[na:na]
> 	at org.apache.jackrabbit.oak.plugins.segment.Segment.getSegment(Segment.java:189) ~[na:na]
> 	at org.apache.jackrabbit.oak.plugins.segment.Record.getSegment(Record.java:97) ~[na:na]
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.getTemplate(SegmentNodeState.java:56) ~[na:na]
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.getChildNode(SegmentNodeState.java:209) ~[na:na]
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore.retrieve(SegmentNodeStore.java:175) ~[na:na]
> 	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.retrieve(SegmentNodeStoreService.java:198) ~[na:na]
> 	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.run(AsyncIndexUpdate.java:97) ~[na:na]
> 	at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:105) ~[org.apache.sling.commons.scheduler-2.4.2.jar:na]
> 	at org.quartz.core.JobRunShell.run(JobRunShell.java:207) [org.apache.sling.commons.scheduler-2.4.2.jar:na]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_40]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_40]
> 	at java.lang.Thread.run(Thread.java:724) [na:1.7.0_40]
> Caused by: java.lang.IllegalStateException: Segment 8a8b281c-1a02-4950-aad5-aad8e436a0d8 not found
> 	at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.loadSegment(FileStore.java:184) ~[na:na]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)