[ 
https://issues.apache.org/jira/browse/SOLR-5580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13859008#comment-13859008
 ] 

Mark Miller commented on SOLR-5580:
-----------------------------------

The Core Admin also lets you set an initial coreNodeName! And it has the same 
use case.

bq. But here the question is not whether we should use core admin or not. I 
feel that the API to add a replica on a particular node would be pretty ugly on 
collections API and it looks more elegant on core admin API.

That needs a discussion in it's own issue. A lot of things make more sense from 
a collection perspective (eg, I want to change the replicationFactor). And we 
need a way to easily distinguish between a operations meant for a Collections 
API collection and those that are not. How we implement that is still open, but 
I would initially lean towards making the collections api powerful enough not 
to need the core admin and then ban it on collection api collections.

bq. I really didn't want to have a half broken deletereplica API

We both want the same functionality - the problem is that it is ahead of it's 
time. The way it has been implemented does not jive with the current system. 
Yes, we need this - but we have to do it right.

> NPE when create a core with both explicite  shard and coreNodeName
> ------------------------------------------------------------------
>
>                 Key: SOLR-5580
>                 URL: https://issues.apache.org/jira/browse/SOLR-5580
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.6
>         Environment: OS:Red Hat Enterprise Linux Server release 6.4 (Santiago)
> Software:solr 4.6,
>                jdk:OpenJDK Runtime Environment (rhel-2.3.4.1.el6_3-x86_64)
>                     OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
>            Reporter: YouPeng Yang
>            Assignee: Mark Miller
>              Labels: core
>             Fix For: 5.0, 4.7, 4.6.1
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> In class org.apache.solr.cloud.Overseer the Line 360:
> ---------------------------------------------------------------------
>           if (sliceName !=null && collectionExists &&  
> !"true".equals(state.getCollection(collection).getStr("autoCreated"))) {
>             Slice slice = state.getSlice(collection, sliceName);
>             if (slice.getReplica(coreNodeName) == null) {
>               log.info("core_deleted . Just return");
>               return state;
>             }
>           }
> ---------------------------------------------------------------------
> the slice needs to be checked null .because when create a new core with both 
> explicite shard and coreNodeName, the state.getSlice(collection, sliceName)  
> may return a null.So it needs to be checked ,or there will be an 
> NullpointException
> ---------------------------------------------------------------------
>           if (sliceName !=null && collectionExists &&  
> !"true".equals(state.getCollection(collection).getStr("autoCreated"))) {
>             Slice slice = state.getSlice(collection, sliceName);
>             if (slice != null && slice.getReplica(coreNodeName) == null) {
>               log.info("core_deleted . Just return");
>               return state;
>             }
>           }
> ---------------------------------------------------------------------



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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

Reply via email to