lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noble Paul (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-5580) NPE when create a core with both explicite shard and coreNodeName
Date Mon, 30 Dec 2013 18:20:53 GMT

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

Noble Paul commented on SOLR-5580:
----------------------------------

bq.No...those are user configurable and should be...a user can always enter bad settings...

I agree with you . But what is the harm in making the coreNodeName editable? If he is sure
about what he is doing , it will work. If he is fiddling with stuff any of those properties
can screw up his system. I really can't see the difference between someone editing collection,
shard, or coreNodeName

bq.No. That is the goal of finishing the Collections API.

If and when we are ready , how do you plan to make the switch? Can we introduce the switch
right away, so that the users who want the new way can go that way. 

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message