Alessandro Hoss created SOLR-12072:
--------------------------------------
Summary: Invalid path string using
ZkConfigManager.copyConfigDir(String fromConfig, String toConfig)
Key: SOLR-12072
URL: https://issues.apache.org/jira/browse/SOLR-12072
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Components: SolrJ
Affects Versions: 7.2.1
Environment:
Reporter: Alessandro Hoss
I've found an issue while using the method ZkConfigManager.copyConfigDir(String
fromConfig, String toConfig) from SolrJ 7.2.1.
The error message is:
Invalid path string "/configs//configs/myconfig" caused by empty node name
specified
The problem is the method with two parameters changes the fromConfig and
toConfig parameters, adding "/configs/", before calling the overloading method
with 3 parameters, that adds "/configs/" again in both parameters.
Guess it's a bit confusing to explain, but it's easier when looking at the
code. Here's the methods implementations :
{code:java}
public void copyConfigDir(String fromConfig, String toConfig) throws
IOException {
copyConfigDir(CONFIGS_ZKNODE + "/" + fromConfig, CONFIGS_ZKNODE + "/" +
toConfig, null);
}
public void copyConfigDir(String fromConfig, String toConfig, Set<String>
copiedToZkPaths) throws IOException {
copyConfigDirFromZk(CONFIGS_ZKNODE + "/" + fromConfig, CONFIGS_ZKNODE + "/" +
toConfig, copiedToZkPaths);
}
{code}
The solution is just remove the 'CONFIGS_ZKNODE + "/"' in the former method.
The workaround is calling directly the latter method.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]