Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3267

Consistency checker needs to run multiple times to fix all problems

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.4.3, 2.5.1
    • None
    • None

    Description

      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.

      Attachments

        1. singlerunfix.patch
          21 kB
          Unico Hommes

        Activity

          People

            Unassigned Unassigned
            unico@apache.org Unico Hommes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: