Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-2492

Flag Document having many children

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Later
    • None
    • None
    • mongomk

    Description

      Current DocumentMK logic while performing a diff for child nodes works as below

      1. Get children for before revision upto MANY_CHILDREN_THRESHOLD (which defaults to 50). Further note that current logic of fetching children nodes also add children NodeDocument to Document cache and also reads the complete Document for those children
      2. Get children for after revision with limits as above
      3. If the child list is complete then it does a direct diff on the fetched children
      4. if the list is not complete i.e. number of children are more than the threshold then it for a query based diff (also see OAK-1970)

      So in those cases where number of children are large then all work done in #1 above is wasted and should be avoided. To do that we can mark those parent nodes which have many children via special flag like _manyChildren. One such nodes are marked the diff logic can check for the flag and skip the work done in #1

      This is kind of similar to way we mark nodes which have at least one child (OAK-1117)

      Attachments

        Issue Links

          Activity

            People

              chetanm Chetan Mehrotra
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: