Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
6.6.2, 7.2
-
None
-
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
Attachments
Issue Links
- is duplicated by
-
SOLR-11860 Change the default state format to 2
- Resolved