lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-4075) Upon removing the last core of a shard - Zookeeper keeps the shard and SOLR sends queries to it giving "no servers hosting shard:" when distributed query is run.
Date Thu, 15 Nov 2012 07:58:12 GMT

     [ https://issues.apache.org/jira/browse/SOLR-4075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mark Miller updated SOLR-4075:
------------------------------

    Attachment: SOLR-4075.patch

Here is a first patch with a fix - test is visual - I have to add some checks to it.
                
> Upon removing the last core of a shard - Zookeeper keeps the shard and SOLR sends queries
to it giving "no servers hosting shard:" when distributed query is run.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-4075
>                 URL: https://issues.apache.org/jira/browse/SOLR-4075
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>            Reporter: Gilles Comeau
>            Assignee: Mark Miller
>            Priority: Minor
>              Labels: patch
>             Fix For: 4.1, 5.0
>
>         Attachments: SOLR-4075.patch
>
>
> Simple Repro of this issue: which now I thought was related to the decision made in:
https://issues.apache.org/jira/browse/SOLR-3080 but Mark tells me might have been a problem
during the zk layout refactoring right before 4.0.
> 1.	Download SOLR 4 production and extract.
> 2.	Replace solr.xml in apache-solr-4.0.0/example/solr/solr.xml with:
> <?xml version="1.0" encoding="UTF-8" ?>
> <solr persistent="true">
>   <cores adminPath="/admin/cores" defaultCoreName="collection1" host="${host:}" hostPort="${jetty.port:}"
hostContext="${hostContext:}" zkClientTimeout="${zkClientTimeout:15000}">
>     <core shard="shard1" instanceDir="collection1/" name="collection1" collection="polecat"/>
>     <core shard="shard1" instanceDir="collection2/" name="collection2" collection="polecat"/>
>     <core schema="schema.xml" shard="core3" instanceDir="core3/" name="core3" config="solrconfig.xml"
collection="polecat" dataDir="data"/>
>   </cores>
> </solr>
> 3.	Start solr with: java -Dbootstrap_confdir=./solr/collection1/conf -Dcollection.configName=myconf
-DzkRun -Dsolrcloud.skip.autorecovery=true  -jar start.jar
> 	(skip.autorecovery is used because the shards don't exist previously)
> Then run this:
> 	Sanity query:  http://localhost:8983/solr/polecat/select?q=*%3A*&wt=xml&distrib=true
> 	Remove the core: http://localhost:8983/solr/admin/cores?action=UNLOAD&core=core3&deleteIndex=true
> 	Error query: http://localhost:8983/solr/polecat/select?q=*%3A*&wt=xml&distrib=true
> And the sanity query, we will receive 0 records, the error query "no servers hosting
shard:".   And in the clusterstate.json:  "core3":{"replicas":{}}}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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


Mime
View raw message