Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-7719

CheckCommand should consistently use an alternative journal if specified

    XMLWordPrintableJSON

    Details

      Description

      Callers of the check command can specify an alternative journal with the --journal option. This option instructs the ConsistencyChecker to check the revisions stored in that file instead of the ones stored in the default journal.log.

      I spotted at least two problems while using --journal on a repository with a corrupted journal.log that didn't contain any valid revision.

      First, the path to the FileStore is validated by FileStoreHelper#isValidFileStoreOrFail, which checks for the existence of a journal.log in the specified folder. But if a journal.log doesn't exist and the user specified a different journal on the command line this check should be ignored.

      Second, when opening the FileStore the default journal.log is scanned to determine the initial revision of the head state. If a user specifies an alternative journal on the command line, that journal should be used instead of the default journal.log. It might be that the default journal contains no valid revision, which would force the system to crash when opening a new instance of FileStore.

        Attachments

          Activity

            People

            • Assignee:
              frm Francesco Mari
              Reporter:
              frm Francesco Mari
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: