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

Erick Erickson commented on SOLR-12072:
---------------------------------------

Yeah, that can't be right ;)... Thanks!

Very minor nit, and just for future reference. It's preferred to just name 
patches with the JIRA and ".patch" extension, even multiple copies of a patch. 
In this case name all patches exactly
SOLR-12072.patch

Each subsequent upload grays out all the previous ones rather than overwrites 
them. That makes it easier to tell which is the most recent. The exception is 
if you, say, reopen a JIRA and have to attach a patch-for-the-patch...



> 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
>            Assignee: Erick Erickson
>            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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to