Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1352

Repository should optimize child nodes in background

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • 3.0.0.Alpha1
    • JCR

      The RepositoryCache already has the ability to break the child references for a node into more than one Schematic document (called 'segments' or 'blocks'), and to properly read and update these segmented child references. However, when adding child nodes the SessionCache always appends the children to the last segment. The code was designed such that the process of "optimizing" the segments used to store the child references would always be done in the background, using a map-reduce process. The DocumentTranslator.optimizeChildrenBlocks(NodeKey) method already has been written and tested, but is currently not called or used by the JcrRepository.

      Therefore, this issue involves adding a background process that uses map-reduce to identify candidate documents (representing nodes or segments) that have large numbers of child references, and to then call DocumentTranslator.optimizeChildrenBlocks(NodeKey) on each of those candidate documents.

      Note that the "optimizeChildrenBlocks" method already stops without doing anything if the number of child references is "small enough", so any modifications to the document between identification as a candidate and optimizing should already be handled by the optimization method.

              Unassigned Unassigned
              rhauch Randall Hauch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: