lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject lucene-solr:master: SOLR-12072: Invalid path string using ZkConfigManager.copyConfigDir(String fromConfig, String toConfig)
Date Fri, 09 Mar 2018 06:00:24 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master dae572819 -> 7dfb04ee5


SOLR-12072: Invalid path string using ZkConfigManager.copyConfigDir(String fromConfig, String
toConfig)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7dfb04ee
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7dfb04ee
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7dfb04ee

Branch: refs/heads/master
Commit: 7dfb04ee5e9f973fbad20c529ec091c201743398
Parents: dae5728
Author: Erick <erick@apache.org>
Authored: Thu Mar 8 22:00:16 2018 -0800
Committer: Erick <erick@apache.org>
Committed: Thu Mar 8 22:00:16 2018 -0800

----------------------------------------------------------------------
 solr/CHANGES.txt                                              | 3 +++
 .../java/org/apache/solr/common/cloud/ZkConfigManager.java    | 2 +-
 .../org/apache/solr/common/cloud/TestZkConfigManager.java     | 7 +++++++
 3 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7dfb04ee/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index fe477be..7f62042 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -261,6 +261,9 @@ Bug Fixes
   in normalization instead of all.  This bug normally doesn't matter since TextField doesn't
call it.
   (Tim Allison via David Smiley)
 
+* SOLR-12072: Invalid path string using ZkConfigManager.copyConfigDir(String fromConfig,
String toConfig)
+  (Alessandro Hoss via Erick Erickson)
+
 Optimizations
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7dfb04ee/solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java
index 312cb90..015793c 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkConfigManager.java
@@ -162,7 +162,7 @@ public class ZkConfigManager {
    * @throws IOException if an I/O error occurs
    */
   public void copyConfigDir(String fromConfig, String toConfig) throws IOException {
-    copyConfigDir(CONFIGS_ZKNODE + "/" + fromConfig, CONFIGS_ZKNODE + "/" + toConfig, null);
+    copyConfigDir(fromConfig, toConfig, null);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7dfb04ee/solr/solrj/src/test/org/apache/solr/common/cloud/TestZkConfigManager.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/common/cloud/TestZkConfigManager.java b/solr/solrj/src/test/org/apache/solr/common/cloud/TestZkConfigManager.java
index 159ff82..cf82305 100644
--- a/solr/solrj/src/test/org/apache/solr/common/cloud/TestZkConfigManager.java
+++ b/solr/solrj/src/test/org/apache/solr/common/cloud/TestZkConfigManager.java
@@ -115,6 +115,13 @@ public class TestZkConfigManager extends SolrTestCaseJ4 {
       // uploading same files to a new name creates a new config
       configManager.uploadConfigDir(tempConfig, "config2");
       assertEquals(2, configManager.listConfigs().size());
+
+      // Test copying a config works in both flavors
+      configManager.copyConfigDir("config2", "config2copy");
+      configManager.copyConfigDir("config2", "config2copy2", null);
+      configs = configManager.listConfigs();
+      assertTrue("config2copy should exist", configs.contains("config2copy"));
+      assertTrue("config2copy2 should exist", configs.contains("config2copy2"));
     }
   }
 


Mime
View raw message