dsmiley commented on code in PR #3904: URL: https://github.com/apache/solr/pull/3904#discussion_r2678283600
########## changelog/unreleased/SOLR-18008-simulate_solr_core_remnants.yml: ########## @@ -0,0 +1,9 @@ +# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc +title: Enhance existing setting for removing unknown cores at startup to also apply when creating collections and adding replicas and remnant core files already exist. Review Comment: False. Instead say the setting we added ########## solr/core/src/java/org/apache/solr/core/CoreContainer.java: ########## Review Comment: You have finally touched CoreContainer, Eric... achievement unlocked ;-) ########## solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java: ########## @@ -240,4 +242,23 @@ protected Properties buildCoreProperties(CoreDescriptor cd) { p.putAll(cd.getPersistableUserProperties()); return p; } + + protected void checkForExistingCore(CoreDescriptor cd) { + if (Files.exists(cd.getInstanceDir())) { + final boolean deleteUnknownCores = + EnvUtils.getPropertyAsBool("solr.cloud.delete.unknown.cores.enabled", false); Review Comment: There's nothing SolrCloud about the condition leading us to this method, yet we've named the property constraining it apparently to SolrCloud. To reconcile that, lets modify the condition at instanceDir existence check to also that that the `cd` has a cloud descriptor. Or make the property more generic. I have no opinion. If you go the latter way, maybe name it `solr.admin.core.create.replaces.enabled`. Shrug. Also need to keep in sync with the warning log, ref guide page, changelog yml, test. Ugh. -- 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]
