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

Francesco Mari commented on OAK-7866:
-------------------------------------

Extracting the consistency check logic out of {{ConsistencyChecker}} proves 
more difficult than expected and deserves another issue. I created OAK-7918 to 
track the refactoring.

> Add tooling for recovering from an outdated journal
> ---------------------------------------------------
>
>                 Key: OAK-7866
>                 URL: https://issues.apache.org/jira/browse/OAK-7866
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: segment-tar
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>            Priority: Major
>             Fix For: 1.10
>
>
> Some error conditions in the Segment Store might prevent the journal from 
> being updated. After a restart the system will be rolled back to the latest 
> version persisted in the journal. Every change performed after the system 
> stopped updating the journal appears to be lost.
> Unless some deep inconsistencies are found in the segments, it might be 
> possible to recover from an outdated journal by performing the following 
> steps:
> * Backup the previous journal.
> * Scan the segments for node records representing super-roots.
> * Order the found records by segment creation date (ascending) and record 
> number (ascending).
> * Create a new journal with the ordered entries.
> * Perform a sanity check of the journal (as the "check" tool does).
> We should have a tool executing these steps. Being a "porcelain" tool, it 
> should have a small and stable command-line interface, be safe in the face of 
> unexpected error conditions, and be friendly when communicating to the user 
> both in case of success and in case of errors.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to