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

Restore from backup creates old format collections

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

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 6.6.2, 7.2
    • None
    • Backup/Restore
    • None

    Description

      Restoring a collection from a backup always creates the new collection using the old format state json (format 1), as a global clusterstate.json file at top level of ZK. All new collections should be defaulting to use the newer per-collection (format 2) in /collections/.../state.json

      As we're running clusters with many collections, the old global state format isn't good for us, so as a workaround for now we're calling MIGRATESTATEFORMAT immediately after the RESTORE call.

      This bug was mentioned in the comments of SOLR-5750 and also recently mentioned by [~varunthacker] in SOLR-11560

      Code patch attached, but as per David Smiley's comment in the code, fixing this means at least 1 test class doesn't succeed anymore. From what I can tell, the BasicDistributedZk2Test fails because it's not using the official collection API to create a collection, it seems to be bypassing that and manually creating cores using the core admin api instead, which I think is not enough to ensure the correct ZK nodes are created. The test superclass has some methods to create a collection which do use the collection api so I could try fixing the tests (I'm just not that familiar with why those BasicDistributed*Test classes aren't using the collection api).

      Attachments

        Issue Links

        Activity

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

          People

            varun Varun Thacker
            TimOwen Tim Owen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment