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]