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

IndexDefMergerUtils Uses Incorrect Index Name for merges Property

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.42.0
    • 1.44.0
    • oak-run
    • None

    Description

      Problem

      The IndexDefMergerUtils uses the ancestorName and customName values for setting the merges property when merging an index instead of the latest product Index Name and custom name.

      Example

      Given the following indexes:

      newIndexes: [index-2]
      allIndexes: [index-1, index-1-custom-1]

      Calling IndexDefMergerUtils.merge(newIndexes, allIndexes) would result in an index with the property:

      index-2-custom-1:

      {   merges: [index-1, index-1-custom-1]  }

      Result

      When the new index-2 definition is loaded, the index-1 definition in the repository will be superseded and no longer be active. Since the IndexName class will only consider an index active if every index it references in the merges property is either active, disabled or removed, the new index-2-custom-1 index will not be active and therefore not considered for queries.

      Expected Result

      The merged index will be created in a way that the new custom indexes are considered for queries once the merged version of the base index is active.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            thomasm Thomas Mueller
            dklco Dan Klco
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment