You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yury Kats (JIRA)" <ji...@apache.org> on 2011/08/03 02:16:27 UTC

[jira] [Created] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

solr.xml persistence is broken for multicore (by SOLR-2331)
-----------------------------------------------------------

                 Key: SOLR-2691
                 URL: https://issues.apache.org/jira/browse/SOLR-2691
             Project: Solr
          Issue Type: Bug
          Components: multicore
    Affects Versions: 4.0
            Reporter: Yury Kats
            Priority: Critical


With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
the solr.xml gets overwritten with only the last core, repeated as many times
as there are cores.

It used to work fine with a trunk build from a couple of months ago, so it looks like
something broke solr.xml persistence. 

It appears to have been introduced by SOLR-2331:
CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
and hence only the values from the last core are preserved and used for all cores in the list.

I'm running SolrCloud, using:
-Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun

I'm starting Solr with four cores listed in solr.xml:

<solr persistent="true">
  <cores adminPath="/admin/cores" defaultCoreName="master1">
    <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
    <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
    <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
    <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
  </cores>
</solr>

I then issue a PERSIST request:
http://localhost:8983/solr/admin/cores?action=PERSIST

And the solr.xml turns into:

<solr persistent="true">
  <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
    <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
    <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
    <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
    <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
  </cores>
</solr>

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

        

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


[jira] [Updated] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-2691:
---------------------------

    Attachment: SOLR-2691.patch

patch of persistence tests at the CoreContainer level (since that's where the bug was)  that incorporates Yury's fix.

the assertions could definitely be beefed up to sanity check more aspects of the serialization, and we should really also be testing that "load" works and parses all of these things back in in the expected way as well, but it's a start.

The thing that's currently hanging me up is that somehow the test is leaking a SolrIndexSearcher reference.  I thought maybe it was because of the SolrCores i was creating+registering and then ignoring, but if i try to close them i get an error about too many decrefs instead.

I'll let miller figure it out

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: SOLR-2691.patch, jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Updated] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Yury Kats (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yury Kats updated SOLR-2691:
----------------------------

    Attachment: jira2691.patch

Patch. Create map of attributes inside the loop.

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Priority: Critical
>         Attachments: jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Commented] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078713#comment-13078713 ] 

Mark Miller commented on SOLR-2691:
-----------------------------------

Hey hossman, your patch seems to be missing some content ;)

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: SOLR-2691.patch, jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Commented] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085923#comment-13085923 ] 

Mark Miller commented on SOLR-2691:
-----------------------------------

weird...that should really be a test fail...we should probably track cores as we do searchers...

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: SOLR-2691.patch, SOLR-2691.patch, jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Updated] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller updated SOLR-2691:
------------------------------

    Fix Version/s: 4.0
         Assignee: Mark Miller

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Resolved] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller resolved SOLR-2691.
-------------------------------

    Resolution: Fixed

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: SOLR-2691.patch, SOLR-2691.patch, jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Reopened] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man reopened SOLR-2691:
----------------------------


I'm still seeing this test complain that close() is being called on SolrCore too many times...

{noformat}
    [junit] Testsuite: org.apache.solr.core.TestCoreContainer
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.611 sec
    [junit] 
    [junit] ------------- Standard Error -----------------
    [junit] 2011.08.16. 9:59:36 org.apache.solr.core.SolrCore close
    [junit] SEVERE: Too many close [count:-1] on org.apache.solr.core.SolrCore@25a41cc7. Please report this exception to solr-user@lucene.apache.org
    [junit] ------------- ---------------- ---------------
{noformat}

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: SOLR-2691.patch, SOLR-2691.patch, jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Resolved] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller resolved SOLR-2691.
-------------------------------

    Resolution: Fixed

Thanks Yury and hossman!

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: SOLR-2691.patch, SOLR-2691.patch, jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Commented] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078719#comment-13078719 ] 

Mark Miller commented on SOLR-2691:
-----------------------------------

Thanks a lot for the catch and diagnosis Yury - hossman tends to sleep all day, but when he gets up and delivers his patch, we will get this in right away.

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: SOLR-2691.patch, jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Commented] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088279#comment-13088279 ] 

Mark Miller commented on SOLR-2691:
-----------------------------------

You dont want to close y because it's been registered and the CoreContainer will close it. You do want to close X because it has been removed from the CoreContainer.

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: SOLR-2691.patch, SOLR-2691.patch, jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Commented] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Yury Kats (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078832#comment-13078832 ] 

Yury Kats commented on SOLR-2691:
---------------------------------

Thanks, guys. Appreciate the quick turn around!

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: SOLR-2691.patch, SOLR-2691.patch, jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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


[jira] [Updated] (SOLR-2691) solr.xml persistence is broken for multicore (by SOLR-2331)

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-2691:
---------------------------

    Attachment: SOLR-2691.patch

Bah ... forgot to svn add

> solr.xml persistence is broken for multicore (by SOLR-2331)
> -----------------------------------------------------------
>
>                 Key: SOLR-2691
>                 URL: https://issues.apache.org/jira/browse/SOLR-2691
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.0
>            Reporter: Yury Kats
>            Assignee: Mark Miller
>            Priority: Critical
>             Fix For: 4.0
>
>         Attachments: SOLR-2691.patch, SOLR-2691.patch, jira2691.patch
>
>
> With the trunk build, running SolrCloud, if I issue a PERSIST CoreAdmin command,
> the solr.xml gets overwritten with only the last core, repeated as many times
> as there are cores.
> It used to work fine with a trunk build from a couple of months ago, so it looks like
> something broke solr.xml persistence. 
> It appears to have been introduced by SOLR-2331:
> CoreContainer#persistFile creates the map for core attributes (coreAttribs) outside 
> of the loop that iterates over cores. Therefore, all cores reuse the same map of attributes
> and hence only the values from the last core are preserved and used for all cores in the list.
> I'm running SolrCloud, using:
> -Dbootstrap_confdir=/opt/solr/solr/conf -Dcollection.configName=hcpconf -DzkRun
> I'm starting Solr with four cores listed in solr.xml:
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="master1">
>     <core name="master1" instanceDir="master1" shard="shard1" collection="hcpconf" />
>     <core name="master2" instanceDir="master2" shard="shard2" collection="hcpconf" />
>     <core name="slave1" instanceDir="slave1" shard="shard1" collection="hcpconf" />
>     <core name="slave2" instanceDir="slave2" shard="shard2" collection="hcpconf" />
>   </cores>
> </solr>
> I then issue a PERSIST request:
> http://localhost:8983/solr/admin/cores?action=PERSIST
> And the solr.xml turns into:
> <solr persistent="true">
>   <cores defaultCoreName="master1" adminPath="/admin/cores" zkClientTimeout="10000" hostPort="8983" hostContext="solr">
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>     <core shard="shard2" instanceDir="slave2/" name="slave2" collection="hcpconf"/>
>   </cores>
> </solr>

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

        

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