diff --git oak-doc/src/site/markdown/nodestore/segment/overview.md oak-doc/src/site/markdown/nodestore/segment/overview.md index 18e29fc..92c9abc 100644 --- oak-doc/src/site/markdown/nodestore/segment/overview.md +++ oak-doc/src/site/markdown/nodestore/segment/overview.md @@ -531,18 +531,17 @@ This tool is the counterpart of `backup`. ### Check ``` -java -jar oak-run.jar check PATH [--journal JOURNAL] [--deep] [--notify SECS] [--bin [LENGTH]] [--io-stats] +java -jar oak-run.jar check PATH [--journal JOURNAL] [--notify SECS] [--bin LENGTH] [--io-stats] ``` The `check` tool inspects an existing Segment Store at `PATH` for eventual inconsistencies. The algorithm implemented by this tool traverses every revision in the journal, from the most recent to the oldest. For every revision, the actual nodes and properties are traversed, verifying that every piece of data is reachable and undamaged. +A deep scan of the content tree, traversing every node, will be performed by default. If the `--journal` option is specified, the tool will use the journal file at `JOURNAL` instead of picking up the one contained in `PATH`. `JOURNAL` must be a path to a valid journal file for the Segment Store. -If the `--deep` option is specified, the tool will perform a deep scan of the content tree, traversing every node. - If the `--notify` option is specified, the tool will print progress information messages every `SECS` seconds. If not specified, progress information messages will be disabled. If `SECS` equals `0`, every progress information message is printed. diff --git oak-run/src/main/java/org/apache/jackrabbit/oak/run/CheckCommand.java oak-run/src/main/java/org/apache/jackrabbit/oak/run/CheckCommand.java index f7a22e4..0b74511 100644 --- oak-run/src/main/java/org/apache/jackrabbit/oak/run/CheckCommand.java +++ oak-run/src/main/java/org/apache/jackrabbit/oak/run/CheckCommand.java @@ -36,7 +36,7 @@ class CheckCommand implements Command { "journal", "journal file") .withRequiredArg().ofType(String.class).defaultsTo("journal.log"); OptionSpec deep = parser.accepts( - "deep", "enable deep consistency checking. "); + "deep", " enable deep consistency checking. "); ArgumentAcceptingOptionSpec notify = parser.accepts( "notify", "number of seconds between progress notifications") .withRequiredArg().ofType(Long.class).defaultsTo(Long.MAX_VALUE); @@ -67,10 +67,15 @@ class CheckCommand implements Command { } } + if (options.has(deep)) { + printUsage(parser, "The --deep option was deprecated! Please do not use it in the future!" + , "A deep scan of the content tree, traversing every node, will be performed by default."); + } + if (options.has(segment)) { - SegmentUtils.check(dir, journalFileName, fullTraversal, debugLevel, binLen); + SegmentUtils.check(dir, journalFileName, true, debugLevel, binLen); } else { - SegmentTarUtils.check(dir, journalFileName, fullTraversal, debugLevel, binLen, options.has(ioStatistics)); + SegmentTarUtils.check(dir, journalFileName, true, debugLevel, binLen, options.has(ioStatistics)); } }