You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Unico Hommes (Created) (JIRA)" <ji...@apache.org> on 2012/03/21 16:35:39 UTC

[jira] [Created] (JCR-3267) Consistency checker needs to run multiple times to fix all problems

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


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

        

[jira] [Updated] (JCR-3267) Consistency checker needs to run multiple times to fix all problems

Posted by "Unico Hommes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Unico Hommes updated JCR-3267:
------------------------------

    Fix Version/s: 2.6

This one still needs to be backported to 2.4 branch
                
> 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.6
>
>         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

        

[jira] [Resolved] (JCR-3267) Consistency checker needs to run multiple times to fix all problems

Posted by "Unico Hommes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Unico Hommes resolved JCR-3267.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4.3
    
> 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.6
>
>         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

        

[jira] [Updated] (JCR-3267) Consistency checker needs to run multiple times to fix all problems

Posted by "Unico Hommes (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Unico Hommes updated JCR-3267:
------------------------------

    Attachment: singlerunfix.patch
    
> 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
>         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

        

[jira] [Commented] (JCR-3267) Consistency checker needs to run multiple times to fix all problems

Posted by "Unico Hommes (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234430#comment-13234430 ] 

Unico Hommes commented on JCR-3267:
-----------------------------------

Patch against 2.6 trunk. Patch includes patch for JCR-3265
                
> 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
>         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

        

[jira] [Updated] (JCR-3267) Consistency checker needs to run multiple times to fix all problems

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ 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