Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 10CB07FD0 for ; Thu, 6 Oct 2011 19:51:52 +0000 (UTC) Received: (qmail 71338 invoked by uid 500); 6 Oct 2011 19:51:51 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 71238 invoked by uid 500); 6 Oct 2011 19:51:51 -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 71231 invoked by uid 99); 6 Oct 2011 19:51:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2011 19:51:51 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2011 19:51:50 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id ACBD52AC3E9 for ; Thu, 6 Oct 2011 19:51:29 +0000 (UTC) Date: Thu, 6 Oct 2011 19:51:29 +0000 (UTC) From: "Julian Reschke (Updated) (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <578784632.4771.1317930689708.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1275730773.21665.1315915149823.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (JCR-3069) add optional consistency checks to test suite MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-3069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Reschke updated JCR-3069: -------------------------------- Attachment: JCR-3069.patch Updated patch (sorry for the missing file and the broken import) > add optional consistency checks to test suite > --------------------------------------------- > > Key: JCR-3069 > URL: https://issues.apache.org/jira/browse/JCR-3069 > Project: Jackrabbit Content Repository > Issue Type: Wish > Components: jackrabbit-core > Reporter: Julian Reschke > Assignee: Julian Reschke > Attachments: JCR-3069.patch, JCR-3069.patch > > > We know that certain sequences of calls can cause the persistent state to become inconsistent, such as by producing orphaned nodes. > This usually does not manifest itself in tests failing. However, it can mean (silent) data loss, and become visible at a different point of time in the form of nodes that can be discovered using a query, but which can not compute their path. > Checking the persistence layer's consistency is implementation specific. In Jackrabbit, there is a consistency check call on the PersistenceManager that we could use. It just logs a results and doesn't provide a checkable return value, but it would be a start. > Proposed helper code (thx to Marcel for the proposal): > /** > * Runs a consistency check on the given workspace. > * > * @param name the name of the workspace to perform the consistency check. > * @param repo the repository instance. > * @throws RepositoryException if an error occurs while getting the > * workspace with the given name. > */ > public static void checkConsistency(String name, RepositoryImpl repo) > throws RepositoryException { > RepositoryImpl.WorkspaceInfo wspInfo = repo.getWorkspaceInfo(name); > wspInfo.getPersistenceManager().checkConsistency(null, true, false); > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira