dsmiley commented on code in PR #3146:
URL: https://github.com/apache/solr/pull/3146#discussion_r1970369309

##########
solr/core/src/java/org/apache/solr/schema/ManagedIndexSchemaFactory.java:
##########
@@ -148,12 +147,11 @@ public String lookupZKManagedSchemaPath() {
    */
   public Path lookupLocalManagedSchemaPath() {
     final Path legacyManagedSchemaPath =
-        Paths.get(

Review Comment:
   Separate PR (no JIRA), but IMO java.nio.file.Paths should probably be added 
to forbiddenapis config so we don't use it whatsoever.  Only has 2 methods 
introduced in Java 7 that simply call to Java 11 Path.of.  IntelliJ makes 
trivial work of inlining those methods.  So Paths is obsolete but doesn't 
_really_ telly you that in it's javadocs.  Heck; same with the old Hashtable :-)



##########
solr/core/src/test/org/apache/solr/client/solrj/embedded/TestEmbeddedSolrServerConstructors.java:
##########
@@ -58,4 +63,58 @@ public void testNodeConfigConstructor() throws Exception {
       assertEquals(1, server.query("newcore", new 
SolrQuery("*:*")).getResults().getNumFound());
     }
   }
+
+  @Test
+  public void testPathConstructorZipFS() throws Exception {
+    Path dataDir = createTempDir("data-dir");
+    Path archive = createTempFile("configset", ".zip");
+    Files.delete(archive);
+
+    // When :
+    // Prepare a zip archive which contains
+    // the configset files as shown below:
+    //
+    // configset.zip
+    // └── 1
+    //     └── 2
+    //         └── 3
+    //             └── 4
+    //                 ├── data
+    //                 │   └── core1
+    //                 │       ├── conf
+    //                 │       │   ├── managed-schema.xml

Review Comment:
   BTW if you actually did want to launch Solr from a ZIP; the choice of a 
"managed" schema is dubious as it implies the mutability of the schema, yet the 
zip is read-only.  In my experience, I've only seen people actually use a 
managed schema as-intended for POCs.  I suppose you worked around this with the 
memory based StorageIO thing.



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

Reply via email to