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/01/14 18:56:35 UTC

[GitHub] [solr] dsmiley commented on a change in pull request #524: SOLR-15919 Replace File with Path for many ZK operations

dsmiley commented on a change in pull request #524:
URL: https://github.com/apache/solr/pull/524#discussion_r785081469



##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java
##########
@@ -338,14 +338,14 @@ public static void downloadFromZK(SolrZkClient zkClient, String zkPath, Path fil
       if (children.size() == 0) {
         // If we didn't copy data down, then we also didn't create the file. But we still need a marker on the local
         // disk so create an empty file.
-        if (copyDataDown(zkClient, zkPath, file.toFile()) == 0) {
+        if (copyDataDown(zkClient, zkPath, file) == 0) {
           Files.createFile(file);
         }
       } else {
         Files.createDirectories(file); // Make parent dir.
         // ZK nodes, whether leaf or not can have data. If it's a non-leaf node and
         // has associated data write it into the special file.
-        copyDataDown(zkClient, zkPath, new File(file.toFile(), ZKNODE_DATA_FILE));

Review comment:
       Yeah; me too!




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