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

longkeyy commented on SOLR-4068:
--------------------------------

 private RangeInfo addRangeInfo(String collection) {
    List<Range> ranges;
    RangeInfo rangeInfo;
    rangeInfo = new RangeInfo();
    
    Map<String,Slice> slices = getSlices(collection);
    
    if (slices == null) {
      throw new SolrException(ErrorCode.BAD_REQUEST, "Can not find collection "
          + collection + " in " + this);
    }
    
    Map<String,Slice> newSlices = new LinkedHashMap<String,Slice>();       
    // delete died shards
    for (Slice slice : slices.values()) {      
      Collection<Replica> rep = slice.getReplicas();
      for (Replica replica : rep) {
        for (String liveNode : liveNodes) {
          if (replica.getName().contains(liveNode)) {
            newSlices.put(slice.getName(), slice);
          }
        }
      }
    }
    
    Set<String> shards = newSlices.keySet();
    
    ArrayList<String> shardList = new ArrayList<String>(shards.size());
    shardList.addAll(shards);
    

    Collections.sort(shardList);
    
    ranges = hp.partitionRange(shards.size(), Integer.MIN_VALUE,
        Integer.MAX_VALUE);
    
    rangeInfo.ranges = ranges;
    rangeInfo.shardList = shardList;
    rangeInfos.put(collection, rangeInfo);
    return rangeInfo;
  }
                
> when all of shards 's core died update was not work
> ---------------------------------------------------
>
>                 Key: SOLR-4068
>                 URL: https://issues.apache.org/jira/browse/SOLR-4068
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>            Reporter: longkeyy
>              Labels: patch
>             Fix For: 4.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> when all of shards 's core died update was not work. then getShardId where 
> got a died shardId with any live core.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to