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

Rasmus Hahn commented on SOLR-2333:
-----------------------------------

Here is a patch that fixes the rename in the style of the swap-action.
Patch is for the 3-1 branch
(https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_1)

Index: solr/src/java/org/apache/solr/core/CoreContainer.java
===================================================================
--- solr/src/java/org/apache/solr/core/CoreContainer.java
(revision 1094545)
+++ solr/src/java/org/apache/solr/core/CoreContainer.java       (working copy)
@@ -381,7 +381,12 @@
     SolrCore old = null;
     synchronized (cores) {
       old = cores.put(name, core);
+      /*
+       * set both the name of the descriptor and the name of the
+       * core, since the descriptors name is used for persisting.
+       */
       core.setName(name);
+      core.getCoreDescriptor ().name = name;
     }


> The "rename" admin action does not persist
> ------------------------------------------
>
>                 Key: SOLR-2333
>                 URL: https://issues.apache.org/jira/browse/SOLR-2333
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 3.1
>            Reporter: Paul R. Brown
>             Fix For: 3.1.1, 3.2, 4.0
>
>
> The core name during the persistence process is drawn from the core 
> descriptor rather than the corecontainer, and the result is that renames are 
> not persistent.  It would be straightforward to change this by using the same 
> style of manipulation of core name as used in the swap admin action.
> It would also be useful to change the access privileges of the name property 
> of a CoreDescriptor so that admin handler implementations can manipulate core 
> names directly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to