You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/02/18 20:33:56 UTC

[GitHub] [solr] HoustonPutman commented on a change in pull request #653: SOLR-15950: Fix auto-creation of filestore in constructor.

HoustonPutman commented on a change in pull request #653:
URL: https://github.com/apache/solr/pull/653#discussion_r810322533



##########
File path: solr/core/src/java/org/apache/solr/filestore/DistribPackageStore.java
##########
@@ -563,28 +562,14 @@ public static boolean isMetaDataFile(String file) {
     return file.charAt(0) == '.' && file.endsWith(".json");
   }
 
-  private void ensurePackageStoreDir(Path solrHome) {
-    final File packageStoreDir = getPackageStoreDirPath(solrHome).toFile();
-    if (!packageStoreDir.exists()) {
-      try {
-        final boolean created = packageStoreDir.mkdirs();
-        if (!created) {
-          log.warn("Unable to create [{}] directory in SOLR_HOME [{}].  Features requiring this directory may fail.", packageStoreDir, solrHome);
-        }
-      } catch (Exception e) {
-        log.warn("Unable to create [{}] directory in SOLR_HOME [{}].  Features requiring this directory may fail.", packageStoreDir, solrHome, e);
-      }
-    }
-  }
-
   public static synchronized Path getPackageStoreDirPath(Path solrHome) {
     var path = solrHome.resolve(PackageStoreAPI.PACKAGESTORE_DIRECTORY);
     if (!Files.exists(path)) {
       try {
         Files.createDirectories(path);
         log.info("Created filestore folder {}", path);
       } catch (IOException e) {

Review comment:
       I'm ambivalent, it'll be thrown anyways and honestly shouldn't happen in a real deployment. Feel free to add it.




-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org