Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4682

CoreAdminRequest.mergeIndexes can not merge mutilple cores.

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2
    • 4.3, 6.0
    • clients - java
    • java version "1.6.0_20"

    Description

      The mergeIndexes method in CoreAdminRequest class accepts an array of srcCores, but it only merge the last core of array into targetCore. Related code as follows,

      CoreAdminRequest.java
      if (srcCores != null) {
      	for (String srcCore : srcCores) {
      		params.set(CoreAdminParams.SRC_CORE, srcCore);
      	}
      }
      

      The for-each loop above overrides the SRC_CORE value in params and only the last one reserved when loop ends.
      We should remove the for-each loop and set SRC_CORE value with an array of srcCores.
      The code above is in CoreAdminRequest class line 330

      Attachments

        Activity

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

          People

            shalin Shalin Shekhar Mangar
            jason.d.cao Jason.D.Cao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment