epugh commented on code in PR #4188:
URL: https://github.com/apache/solr/pull/4188#discussion_r2889661497


##########
solr/core/src/java/org/apache/solr/handler/designer/SchemaDesignerConfigSetHelper.java:
##########
@@ -474,13 +474,28 @@ protected void validateTypeChange(String configSet, 
SchemaField field, FieldType
 
   void deleteStoredSampleDocs(String configSet) {
     try {
+      ensureSystemCollectionExists();
       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);
     }
   }
 
+  private void ensureSystemCollectionExists() throws IOException, 
SolrServerException {
+    if (!zkStateReader().getClusterState().hasCollection(BLOB_STORE_ID)) {
+      log.info("Creating {} collection for blob storage", BLOB_STORE_ID);
+      CollectionAdminRequest.createCollection(BLOB_STORE_ID, null, 1, 
1).process(cloudClient());
+      try {

Review Comment:
   I mean... okay...   Sigh this multi threaded dsitbed stuff is hard.



-- 
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]

Reply via email to