jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-2740) On missing child node, automatically rename entry when trying to add a node with the same name
Date Mon, 08 Nov 2010 15:18:25 GMT

     [ 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.patch

Could those that are familiar with NodeImpl please have a look at the changes and provide
feedback? I know it's not a "real" unit test case yet (I will change that later on).

The solution doesn't try to solve all possible edge cases. It's just a simple solution for
the most common problems. For edge cases we can use the existing consistency check and fix.
This is just for the most common cases, for old repositories where it was relatively easy
to get corruptions. I believe with more recent versions of Jackrabbit it's very hard to get
corruptions. At least, that's the plan - if it's not the case yet then I believe we should
spend most of our time in hardening Jackrabbit, and not in automatically fixing problems :-)

> 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.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.

View raw message