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 "Andrei Dulceanu (JIRA)" <ji...@apache.org> on 2017/02/06 15:24:42 UTC

[jira] [Comment Edited] (OAK-5590) The check command doesn't do any check when "deep" option is not provided

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

Andrei Dulceanu edited comment on OAK-5590 at 2/6/17 3:23 PM:
--------------------------------------------------------------

bq. AFAIKS this would trigger a full traversal
Not necessarily, since {{checkPath}} always does a traversal with {{deep}} set to {{false}} [1].

bq. The reason for tracking bad path internally is performance: fully traversing every revisions from the journal takes way to long.
I understand the reasoning, but it is still unclear to me how this is applied in the current code. The bad path logic is/will be applied only for the root node anyway (in a scenario in which there's a problem with it in the latest revision, its path is added in {{badPaths}} which is checked again in subsequent revisions, until we find a consistent revision). The changes proposed in the patch are in line with this expectation and also keep the current expectation of doing/not doing a full traversal when {{--deep}} is specified/not specified.

[1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tooling/ConsistencyChecker.java#L200



was (Author: dulceanu):
bq. AFAIKS this would trigger a full traversal
Not necessarily, since {{checkPath}} always does a traversal with {{deep}} set to {{false}} [1].

bq. The reason for tracking bad path internally is performance: fully traversing every revisions from the journal takes way to long.
I understand the reasoning, but it is still unclear to me how this is applied in the current code. The bad path logic is/will be applied only for the root node anyway (in a scenario in which there's a problem with it in the latest revision, its path is added in {{badPaths}} which is checked again 
in subsequent revisions, until we find a consistent revision). The changes proposed in the patch are in line with this expectation and also keep the current expectation of doing/not doing a full traversal when {{--deep}} is specified/not specified.

[1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tooling/ConsistencyChecker.java#L200


> The check command doesn't do any check when "deep" option is not provided
> -------------------------------------------------------------------------
>
>                 Key: OAK-5590
>                 URL: https://issues.apache.org/jira/browse/OAK-5590
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: run, segment-tar
>            Reporter: Andrei Dulceanu
>            Assignee: Andrei Dulceanu
>              Labels: tooling
>             Fix For: 1.8, 1.6.1
>
>         Attachments: OAK-5590.patch
>
>
> When the {{check}} command is used without {{--deep}} option, there is no check/traversal being done against the repository.
> First relevant line in code is [1], where a check is supposed to happen, but due to a mismatch between argument expected/argument provided, {{null}} is always returned without checking anything. The method which should do the actual check [2] expects a set of paths to be traversed, but this set is always empty. Therefore, relevant code for running the check is never executed [3].
> [1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tooling/ConsistencyChecker.java#L120
> [2] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tooling/ConsistencyChecker.java#L183
> [3] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tooling/ConsistencyChecker.java#L194



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)