You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alessandro Hoss (JIRA)" <ji...@apache.org> on 2018/03/08 23:34:00 UTC

[jira] [Commented] (SOLR-12072) Invalid path string using ZkConfigManager.copyConfigDir(String fromConfig, String toConfig)

    [ https://issues.apache.org/jira/browse/SOLR-12072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16392111#comment-16392111 ] 

Alessandro Hoss commented on SOLR-12072:
----------------------------------------

First contribution... Please tell me if there's something wrong.

> 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
>            Priority: Minor
>         Attachments: 0001-SOLR-12072.patch
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org