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

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

LGTM.

Let's try to further break it down refactoring {{ConsistencyChecker}} from a 
pure listener into a driver. That is, instead of only receiving callback from 
the code doing all the traversals it should actually drive the traversal. 
{{ConsistenyCheckerTemplate}} would then expose methods for i.e. traversing a 
revision, traversing a node etc. 
 The approach would be similar to the own in 
{{org.apache.jackrabbit.oak.segment.SegmentParser}} and its usage in 
{{org.apache.jackrabbit.oak.segment.RecordUsageAnalyser}}. (Except that the 
inheritance relationship might not be the best idea. It might be better to use 
composition).

 

 

> Extract checking logic from ConsistencyChecker 
> -----------------------------------------------
>
>                 Key: OAK-7918
>                 URL: https://issues.apache.org/jira/browse/OAK-7918
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>            Priority: Major
>             Fix For: 1.10
>
>         Attachments: OAK-7918-01.patch, OAK-7918-02.patch, OAK-7918-03.patch, 
> OAK-7918-04.patch
>
>
> {{ConsistencyChecker}} mixes both the logic proper to a consistency check and 
> reporting and debug statements. Moreover, it is not possible to retrieve 
> programmatically the result of a consistency check, making it impossible to 
> reuse this class in another context. The logic for a consistency check should 
> be extracted to separate class.



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

Reply via email to