jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-5590) The check command doesn't do any check when "deep" option is not provided
Date Mon, 06 Feb 2017 14:43:41 GMT

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

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

[~dulceanu], [~frm] let me clarify a couple of apparent misconceptions re. {{check}}. 

* The goal of {{check}} was to check a repository for inconsistencies and find the most recent
consistent version. To that respect adding a new command line flag where you could restrict
the set of paths to traverse would be a new feature. Let's discuss and track this in a separate
issue from this one. 

* The reason for tracking bad path internally is performance: fully traversing every revisions
from the journal takes *way* to long. The initial logic was: 
## set {{rev}} to the most recent revision from {{journal.log}}
## traverse {{rev}} until a {{SNFE}} occurs and remember the paths where the {{SNFE}} occurred
as bad path. Otherwise {{rev}} is the most recent good revision. 
## go one revision back and traverse all bad paths. Repeat this step until no {{SNFE}} occurs.

## repeat from step 2.

* Not specifying {{\--deep}} means that no traversal would be done but just the root nodes
would be checked. This is probably not helpful and we might want to change it. My preference
would be to always traverse regardless of {{\--deep}}. If the option is specified we could
just print a warning about the option being discontinued and ignored and tell the user that
leaving it out would already do what {{\--deep}} did before.

* For any changes in semantics of the command line options we need to be aware that there
are a lot of command lines around (in Wikis, FAQs, emails, etc.) where people just copy paste
from. If this happens the tool should either still do what the user expects or fail fast.


> 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)

Mime
View raw message