Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 72539 invoked from network); 24 Nov 2010 16:35:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Nov 2010 16:35:08 -0000 Received: (qmail 52280 invoked by uid 500); 24 Nov 2010 16:35:39 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 52056 invoked by uid 500); 24 Nov 2010 16:35:37 -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 52032 invoked by uid 99); 24 Nov 2010 16:35:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Nov 2010 16:35:36 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Nov 2010 16:35:35 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAOGZFEg001151 for ; Wed, 24 Nov 2010 16:35:15 GMT Message-ID: <15899674.289131290616515068.JavaMail.jira@thor> Date: Wed, 24 Nov 2010 11:35:15 -0500 (EST) From: "Thomas Mueller (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-2740) On missing child node, automatically rename entry when trying to add a node with the same name 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-2740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Mueller updated JCR-2740: -------------------------------- Attachment: jcr-2740-b.patch This new patch only fixes the problem when a session attribute is set. Instead of the ItemManager, it uses the ItemStateManager to check for node existence. The new patch fixes the problem when iterating over child nodes, and when trying to remove a node. That means, it's possible to fix all problems in a subtree by iterating over it with a session that has this session attribute set. P.S. I didn't fully test this new patch yet. > On missing child node, automatically rename entry when trying to add a node with the same name > ---------------------------------------------------------------------------------------------- > > Key: JCR-2740 > URL: https://issues.apache.org/jira/browse/JCR-2740 > Project: Jackrabbit Content Repository > Issue Type: New Feature > Components: jackrabbit-core > Reporter: Thomas Mueller > Assignee: Thomas Mueller > Attachments: jcr-2740-b.patch, jcr-2740.patch > > > If a node points to a non-existing child node (which is a repository inconsistency), currently this child node is silently ignored for read operations (as far as I can tell). However, when trying to add another child node with the same name, an exception is thrown with a message saying a child node with this name already exists. > I suggest to rename the missing child node entry in that case (for example add the current date/time, or a random digit until there is no conflict), and then continue with adding the new child node. I wouldn't automatically remove the bad entry, because the node might "appear" later (after a restore), and because removing data from the repository seems wrong. > It's not a perfect solution, but it might be better than throwing an exception and basically preventing changes. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.