If the patch is applied the work around must not be required On 29 Nov 2013 08:17, "Steve Molloy" <[email protected]> wrote:
> Thanks, I already had the genericCoreNodeNames=true in solrcloud section > of solr.xml, new format. But I had a "str" entry instead of a "bool", which > apparently is simply treated as false. Anyhow, in my case the fix works if > I move the bit setting the coreNodeName after the publish, not before. If > it's before, I get a timeout error while it waits for a replica that is > never set in waitForShardId. > > I'll both apply the modified patch and switch from str to bool. :) > > Thanks for the help, > Steve > > > From: Alexey Serba [[email protected]] > > Sent: November 28, 2013 2:10 AM > > To: [email protected] > > Subject: Re: Collections API > > > > > > > https://issues.apache.org/jira/browse/SOLR-5510 > > > > > I don't really understand all the details why is that happening, but the > workaround is to add genericCoreNodeNames="${genericCoreNodeNames:true} > attribute to cores element in your solr.xml file. > > > > > > On Tue, Nov 26, 2013 at 10:10 PM, Steve Molloy > <[email protected]> wrote: > > > I'm trying to reconcile our fork with 4.6 tag and I'm getting weird > behaviour in Collections API, more specifically in ZkController's > preRegister method after calling the create method of the collections API. > When it checks if a slice has a replica for current > node name, there is never any because at this stage, the slice has no > replica. This is the new code that seems to be causing my issue, I can > force the "autoCreated" to be always true to avoid the issue, but would > like a cleaner way if there is one. > > > > if(cd.getCloudDescriptor().getCollectionName() !=null && > cd.getCloudDescriptor().getCoreNodeName() != null ) { > > //we were already registered > > > if(zkStateReader.getClusterState().hasCollection(cd.getCloudDescriptor().getCollectionName())){ > > DocCollection coll = > zkStateReader.getClusterState().getCollection(cd.getCloudDescriptor().getCollectionName()); > > if(!"true".equals(coll.getStr("autoCreated"))){ > > Slice slice = > coll.getSlice(cd.getCloudDescriptor().getShardId()); > > if(slice != null){ > > ==> if(slice.getReplica(cd.getCloudDescriptor().getCoreNodeName()) == > null) { > > log.info("core_removed This core is removed from ZK"); > > throw new SolrException(ErrorCode.NOT_FOUND,coreNodeName +" > is removed"); > > } > > } > > } > > } > > } > > > > Thanks. > > Steve > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [email protected] > > For additional commands, e-mail: > [email protected] > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
