You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Rasmus Hahn <ra...@googlemail.com> on 2011/04/18 18:35:31 UTC

solr-3.1.0 bug/multicore

Good Morning,

i noticed a small bug in your solr-3.1.0 release, but before you read any
further: This should really be a bug report, but i could not find any
possibility to submit a bug report into the jira
(https://issues.apache.org/jira/browse/SOLR). If the latter should be
possible, and someone can point me to a tutorial (best with screenshots)
on where to report bugs, do not hesitate and give me a pointer. Otherwise:

Phenomenon: in a multicore solr, when using the RENAME-action for two cores,
and a solr.xml with persistent='true', the renamed core, does not get its
name persisted in solr.xml; the old name is stored (only the solr.xml file
is wrong, the in-memory-cache is correct).

Reason: in org/apache/solr/core/CoreContainer.java, when persisting the
CoreContainer, solr-3.1.0 writes the values of the private cores-map
(solr-1.4.1 wrote the keys, too). To get the name of the core, the core's
CoreDescriptor is used, but for a RENAME, the core's descriptor is not being
updated.

Fix: i changed this in the register-function of the CoreContainer class,
since it is similar to the SWAP-operation that does a similar thing.

Patch:
  (against 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;
     }


Best Regards - Rasmus

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


Re: solr-3.1.0 bug/multicore

Posted by Erick Erickson <er...@gmail.com>.
I just changed the page Jan pointed you to, adding a note that you
should just try to log in and you'll get a chance to create an account.
Once you do that, you'll be able to enter bugs etc. It's
not all the obvious when you just land on the Solr page...

But do check the but Jan pointed you to, perhaps adding a comment
or better yet a patch....

Best
Erick

On Mon, Apr 18, 2011 at 12:35 PM, Rasmus Hahn <ra...@googlemail.com> wrote:
> Good Morning,
>
> i noticed a small bug in your solr-3.1.0 release, but before you read any
> further: This should really be a bug report, but i could not find any
> possibility to submit a bug report into the jira
> (https://issues.apache.org/jira/browse/SOLR). If the latter should be
> possible, and someone can point me to a tutorial (best with screenshots)
> on where to report bugs, do not hesitate and give me a pointer. Otherwise:
>
> Phenomenon: in a multicore solr, when using the RENAME-action for two cores,
> and a solr.xml with persistent='true', the renamed core, does not get its
> name persisted in solr.xml; the old name is stored (only the solr.xml file
> is wrong, the in-memory-cache is correct).
>
> Reason: in org/apache/solr/core/CoreContainer.java, when persisting the
> CoreContainer, solr-3.1.0 writes the values of the private cores-map
> (solr-1.4.1 wrote the keys, too). To get the name of the core, the core's
> CoreDescriptor is used, but for a RENAME, the core's descriptor is not being
> updated.
>
> Fix: i changed this in the register-function of the CoreContainer class,
> since it is similar to the SWAP-operation that does a similar thing.
>
> Patch:
>  (against 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;
>     }
>
>
> Best Regards - Rasmus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

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


Re: solr-3.1.0 bug/multicore

Posted by Jan Høydahl <ja...@cominvent.com>.
Atually, there is an issue https://issues.apache.org/jira/browse/SOLR-2333 already for this, you can attach your patch to that one :)

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

On 18. apr. 2011, at 20.26, Jan Høydahl wrote:

> Hi,
> 
> Welcome to the Solr community, and thanks for contributing!
> 
> It's actually pretty easy to create a JIRA issue. First, register a new account in JIRA and then create a new issue.
> 
> Here's a Wiki page helping you on the way: http://wiki.apache.org/solr/HowToContribute
> 
> --
> Jan Høydahl, search solution architect
> Cominvent AS - www.cominvent.com
> 
> On 18. apr. 2011, at 18.35, Rasmus Hahn wrote:
> 
>> Good Morning,
>> 
>> i noticed a small bug in your solr-3.1.0 release, but before you read any
>> further: This should really be a bug report, but i could not find any
>> possibility to submit a bug report into the jira
>> (https://issues.apache.org/jira/browse/SOLR). If the latter should be
>> possible, and someone can point me to a tutorial (best with screenshots)
>> on where to report bugs, do not hesitate and give me a pointer. Otherwise:
>> 
>> Phenomenon: in a multicore solr, when using the RENAME-action for two cores,
>> and a solr.xml with persistent='true', the renamed core, does not get its
>> name persisted in solr.xml; the old name is stored (only the solr.xml file
>> is wrong, the in-memory-cache is correct).
>> 
>> Reason: in org/apache/solr/core/CoreContainer.java, when persisting the
>> CoreContainer, solr-3.1.0 writes the values of the private cores-map
>> (solr-1.4.1 wrote the keys, too). To get the name of the core, the core's
>> CoreDescriptor is used, but for a RENAME, the core's descriptor is not being
>> updated.
>> 
>> Fix: i changed this in the register-function of the CoreContainer class,
>> since it is similar to the SWAP-operation that does a similar thing.
>> 
>> Patch:
>> (against 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;
>>    }
>> 
>> 
>> Best Regards - Rasmus
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
> 


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


Re: solr-3.1.0 bug/multicore

Posted by Jan Høydahl <ja...@cominvent.com>.
Hi,

Welcome to the Solr community, and thanks for contributing!

It's actually pretty easy to create a JIRA issue. First, register a new account in JIRA and then create a new issue.

Here's a Wiki page helping you on the way: http://wiki.apache.org/solr/HowToContribute

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

On 18. apr. 2011, at 18.35, Rasmus Hahn wrote:

> Good Morning,
> 
> i noticed a small bug in your solr-3.1.0 release, but before you read any
> further: This should really be a bug report, but i could not find any
> possibility to submit a bug report into the jira
> (https://issues.apache.org/jira/browse/SOLR). If the latter should be
> possible, and someone can point me to a tutorial (best with screenshots)
> on where to report bugs, do not hesitate and give me a pointer. Otherwise:
> 
> Phenomenon: in a multicore solr, when using the RENAME-action for two cores,
> and a solr.xml with persistent='true', the renamed core, does not get its
> name persisted in solr.xml; the old name is stored (only the solr.xml file
> is wrong, the in-memory-cache is correct).
> 
> Reason: in org/apache/solr/core/CoreContainer.java, when persisting the
> CoreContainer, solr-3.1.0 writes the values of the private cores-map
> (solr-1.4.1 wrote the keys, too). To get the name of the core, the core's
> CoreDescriptor is used, but for a RENAME, the core's descriptor is not being
> updated.
> 
> Fix: i changed this in the register-function of the CoreContainer class,
> since it is similar to the SWAP-operation that does a similar thing.
> 
> Patch:
>  (against 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;
>     }
> 
> 
> Best Regards - Rasmus
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
> 


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