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 "Francesco Mari (JIRA)" <ji...@apache.org> on 2018/08/29 10:13:00 UTC
[jira] [Created] (OAK-7719) CheckCommand should consistently use an
alternative journal if specified
Francesco Mari created OAK-7719:
-----------------------------------
Summary: CheckCommand should consistently use an alternative journal if specified
Key: OAK-7719
URL: https://issues.apache.org/jira/browse/OAK-7719
Project: Jackrabbit Oak
Issue Type: Bug
Components: run, segment-tar
Reporter: Francesco Mari
Assignee: Francesco Mari
Fix For: 1.10
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}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)