Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 4270 invoked from network); 29 Feb 2008 19:35:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Feb 2008 19:35:51 -0000 Received: (qmail 9575 invoked by uid 500); 29 Feb 2008 19:35:45 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 9551 invoked by uid 500); 29 Feb 2008 19:35:45 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 9542 invoked by uid 99); 29 Feb 2008 19:35:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Feb 2008 11:35:45 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Feb 2008 19:35:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8779E234C062 for ; Fri, 29 Feb 2008 11:34:51 -0800 (PST) Message-ID: <1180739900.1204313691540.JavaMail.jira@brutus> Date: Fri, 29 Feb 2008 11:34:51 -0800 (PST) From: "Alexander Klimetschek (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1428) Add API for selective bundle consistency check (Jackrabbit-specific) In-Reply-To: <2046758230.1204115391061.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573919#action_12573919 ] Alexander Klimetschek commented on JCR-1428: -------------------------------------------- Had some trouble to actually trigger a problem in the JCR API with a child node entry pointing to a missing node. > session.getRootNode().getNode("fruits").getNode("bananas"); throws a PathNotFoundException (which is IMHO correct) > session.getRootNode().getNode("fruits/bananas"); throws "javax.jcr.RepositoryException: failed to retrieve state of intermediary node: 39d2c699-0dad-4b27-aabd-0437913b5339: 39d2c699-0dad-4b27-aabd-0437913b5339" (which should be a PathNotFoundException, hence the consistency check + fix) Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException: 03679565-9b2b-4602-9030-1ac2e2e324a4 at org.apache.jackrabbit.core.state.SessionItemStateManager.getItemState(SessionItemStateManager.java:178) at org.apache.jackrabbit.core.HierarchyManagerImpl.getItemState(HierarchyManagerImpl.java:119) at org.apache.jackrabbit.core.HierarchyManagerImpl.resolvePath(HierarchyManagerImpl.java:266) at org.apache.jackrabbit.core.CachingHierarchyManager.resolvePath(CachingHierarchyManager.java:132) at org.apache.jackrabbit.core.HierarchyManagerImpl.resolvePath(HierarchyManagerImpl.java:266) at org.apache.jackrabbit.core.CachingHierarchyManager.resolvePath(CachingHierarchyManager.java:132) at org.apache.jackrabbit.core.HierarchyManagerImpl.resolvePath(HierarchyManagerImpl.java:202) ... 23 more This could also be fixed by simply throwing a PathNotFoundEx in HierarchyManagerImpl.resolvePath(Path path, ItemId id, int next) instead of a RepositoryEx when a NoSuchItemStateEx is catched there. This would be more consistent. Otherwise there are probably various complicated scenarios when the child node entry in the underlying database "breaks" during runtime and exceptions pop up everywhere. Are there any typical error.log examples? > Add API for selective bundle consistency check (Jackrabbit-specific) > -------------------------------------------------------------------- > > Key: JCR-1428 > URL: https://issues.apache.org/jira/browse/JCR-1428 > Project: Jackrabbit > Issue Type: New Feature > Components: jackrabbit-core > Reporter: Alexander Klimetschek > Fix For: 1.3.4 > > > Add a jackrabbit-specific API for doing a selective consistencyCheck, ie. on single nodes. The current entire-workspace check can be very slow if there workspace is large enough. Also it should be easy to write a tool to invoke that feature programmatically rather than by configuration + restart (see below). > Existing Implementation: > The current bundle consistencyCheck feature is enabled by setting a bundle PM parameter and restarting Jackrabbit, it will then run upon startup (see JCR-972 for the only issue regarding bundle consistency check). This check looks for broken parent-child relationships, ie. it will remove any child node entries that reference non-existing parent nodes. For non-existing parent UUIDs and other problems in bundles it will log those. > Outlook: > An advanced consistencyCheck could also check for non-existing version nodes and vice-versa (see JCR-630), but this is not the focus of this issue and could be a later addition to the API. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.