[ https://issues.apache.org/jira/browse/SOLR-5580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13858881#comment-13858881 ]
Mark Miller commented on SOLR-5580: ----------------------------------- bq. Do we need a way to 'replace' a replica. It's just a matter of opinion on whether it's a hack to have to remove a replica and then add it or let something take over for it. Either method seems like it should reasonably work if you want it to. In the longer term, the Collections API should be reasonable for all of this stuff, and eventually we won't necessarily support manual core manipulation. Until we do, I think this is a good feature. bq. SOLR-5310 and SOLR-5311 both must be removed together. you can't remove one and leave the other one I don't believe that - it should be fine to still have a command that removes a replica from the clusterstate. bq. I don't see a clean way to implement SOLR-5310 and SOLR-5311 without making the clusterstate ugly Then perhaps they should not be implemented and this energy is better spent working towards a fully functional Collections API. bq. The coreNodeName is not used anywhere , so is it important (or even desirable ) to have custom coreNodeName ? uh...yes it is used... > 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