nick-boss-tech opened a new pull request, #4997: URL: https://github.com/apache/solr/pull/4997
🤖 *AI text below* 🤖 *(posted on behalf of Nick Shanin)* https://issues.apache.org/jira/browse/SOLR-18391 `PlacementPluginAssignStrategy.assign()` threw an NPE on a null `getCollection()` during collection creation, leaving behind a zombie collection with no replicas. The strategy now throws an `AssignmentException` naming the collection instead of NPEing, and `CreateCollectionCmd` catches it, runs `DeleteCollectionCmd` cleanup, and returns `BAD_REQUEST` — so a failed create never leaves a half-created collection in ZooKeeper. Tests: new `CreateCollectionCmdTest` (mocked empty cluster state → expects the `AssignmentException`, verifies `zkClient.clean()` on the collection path and the resulting `BAD_REQUEST`) and `PlacementPluginAssignStrategyTest` — green with Error Prone; Spotless clean. Changelog: `changelog/unreleased/SOLR-18391.yml` (fixed) ### AI assistance AI agents assisted with research, implementation, review, and drafting. Nick Shanin directed the work and takes responsibility for this contribution. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
