epugh commented on code in PR #3031: URL: https://github.com/apache/solr/pull/3031#discussion_r2265419132
########## solr/core/src/java/org/apache/solr/handler/designer/SchemaDesignerConfigSetHelper.java: ########## @@ -466,44 +469,62 @@ protected void validateTypeChange(String configSet, SchemaField field, FieldType SolrException.ErrorCode.BAD_REQUEST, "Cannot change type of the _version_ field; it must be a plong."); } - List<SolrInputDocument> docs = getStoredSampleDocs(configSet); + List<SolrInputDocument> docs = retrieveSampleDocs(configSet); if (!docs.isEmpty()) { schemaSuggester.validateTypeChange(field, toType, docs); } } + String getSampleDocsPathFromConfigSet(String configSet) { + String path = "schemadesigner" + "/" + configSet + "_sampledocs.javabin"; + return path; + } + void deleteStoredSampleDocs(String configSet) { - try { - cloudClient().deleteByQuery(BLOB_STORE_ID, "id:" + configSet + "_sample/*", 10); - } catch (IOException | SolrServerException | SolrException exc) { - final String excStr = exc.toString(); - log.warn("Failed to delete sample docs from blob store for {} due to: {}", configSet, excStr); - } + String path = getSampleDocsPathFromConfigSet(configSet); + // why do I have to do this in two stages? + DistribFileStore.deleteZKFileEntry(cc.getZkController().getZkClient(), path); + cc.getFileStore().delete(path); } + // I don't like this guy just hanging out here to support retrieveSampleDocs. + List<SolrInputDocument> docs = Collections.emptyList(); Review Comment: Redoing where he is defined avoids this issue! -- 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