patsonluk opened a new pull request, #2438: URL: https://github.com/apache/solr/pull/2438
https://issues.apache.org/jira/browse/SOLR-17269 # Description The synthetic collection/replica introduced in Solr 9 registers such collection to zookeeper. This might cause issues with other tools which monitor solr collections via zk and they might be mistaken the synthetic collection as a real collection. # Solution It seems that what we essentially need is a SolrCore in the memory for each config set, which might be able to simply register it against the CoreContainer without actually registering to ZK. We are introducing a new class `SyntheticSolrCore` which extends `SolrCore`, `SyntheticSolrCore` is only used in Coordinator node to support a subset of `SolrCore` functionalities required by Coordinator operations such as aggregating and writing out response and providing configset info. Such core is only registered to the `CoreContainer` but is no longer registering itself to zookeeper. Take note that to minimize code changes, there will still be snapshot/index data directory written to the Coordinator node. We could have overridden `initSnapshotMetaDataManager` and `initIndex` to be no-op to avoid creating them, however, there is currently other code (and possibly future code too) that might rely on the existence of those values. It is safer to just keep them as is. The data folder for the synthetic core would NOT be loaded on QA node start-up as there's no `core.properties` in such directory. This is because instead of going through `CoreContainer#create` for such synthetic core, it's using `SyntheticSolrCore#createAndRegisterCore`, which bypass `core.properties` creation and zk registration # Tests The existing `TestCoordinatorRole` has already provided good coverage of various scenarios. Take note that we have removed the test code that verifies the existence of cores from the synthetic collection since zk no longer keeps track of synthetic collections # Checklist Please review the following and check all that apply: - [x] I have reviewed the guidelines for [How to Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my code conforms to the standards described there to the best of my ability. - [x] I have created a Jira issue and added the issue ID to my pull request title. - [ ] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended) - [x] I have developed this patch against the `main` branch. - [ ] I have run `./gradlew check`. - [x] I have added tests for my changes. - [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org