[ https://issues.apache.org/jira/browse/JCR-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jukka Zitting updated JCR-3267: ------------------------------- Fix Version/s: (was: 2.6) 2.5.1 > Consistency checker needs to run multiple times to fix all problems > ------------------------------------------------------------------- > > Key: JCR-3267 > URL: https://issues.apache.org/jira/browse/JCR-3267 > Project: Jackrabbit Content Repository > Issue Type: Bug > Reporter: Unico Hommes > Fix For: 2.4.3, 2.5.1 > > Attachments: singlerunfix.patch > > > When a node has lost its reference to more than one child only one child node entry is fixed. > This is because the bundles that need modification are first all stored in a collection before being stored as the last step. > The process is something like the following: > 1. node n1 is checked, the parent bundle p1 of n1 is loaded from pm > 2. p1 does not have a child node entry for n1 > 3. a child node entry to n1 is added to p1 > 4. p1 is added to the collection of bundles to be saved when all checking has been done > 5. node n2 is checked, the parent bundle p1 of n2 is loaded from pm (without the previous modifications because the bundle was not yet stored) > 6. p1 does not have a child node entry for n2 > 7. a child node entry to n2 is added to p1 > 8 p1 is added to the collection of bundles to be saved when all checking has been done > 9 after all checking has been done the collections of modified bundles is iterated over > 10. p1 is in the collection twice, once with a fix for n1 and once with a fix for n2 > 11 last one wins and p1 still doesn't have a child node entry for n1 > I'll attach a patch with a proposed fix. -- 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