mirror of https://github.com/apache/lucene.git
SOLR-10741: Factor out createSliceShardsStr method from HttpShardHandler.prepDistributed.
(Domenico Fabio Marino via Christine Poerschke)
This commit is contained in:
parent
4106e1b51a
commit
e7099e4bf5
|
@ -263,6 +263,9 @@ Other Changes
|
|||
* SOLR-10659: Remove ResponseBuilder.getSortSpec use in SearchGroupShardResponseProcessor.
|
||||
(Judith Silverman via Christine Poerschke)
|
||||
|
||||
* SOLR-10741: Factor out createSliceShardsStr method from HttpShardHandler.prepDistributed.
|
||||
(Domenico Fabio Marino via Christine Poerschke)
|
||||
|
||||
================== 6.6.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||
|
|
|
@ -449,17 +449,7 @@ public class HttpShardHandler extends ShardHandler {
|
|||
}
|
||||
}
|
||||
// And now recreate the | delimited list of equivalent servers
|
||||
final StringBuilder sliceShardsStr = new StringBuilder();
|
||||
boolean first = true;
|
||||
for (String shardUrl : shardUrls) {
|
||||
if (first) {
|
||||
first = false;
|
||||
} else {
|
||||
sliceShardsStr.append('|');
|
||||
}
|
||||
sliceShardsStr.append(shardUrl);
|
||||
}
|
||||
rb.shards[i] = sliceShardsStr.toString();
|
||||
rb.shards[i] = createSliceShardsStr(shardUrls);
|
||||
}
|
||||
}
|
||||
String shards_rows = params.get(ShardParams.SHARDS_ROWS);
|
||||
|
@ -472,6 +462,20 @@ public class HttpShardHandler extends ShardHandler {
|
|||
}
|
||||
}
|
||||
|
||||
private static String createSliceShardsStr(final List<String> shardUrls) {
|
||||
final StringBuilder sliceShardsStr = new StringBuilder();
|
||||
boolean first = true;
|
||||
for (String shardUrl : shardUrls) {
|
||||
if (first) {
|
||||
first = false;
|
||||
} else {
|
||||
sliceShardsStr.append('|');
|
||||
}
|
||||
sliceShardsStr.append(shardUrl);
|
||||
}
|
||||
return sliceShardsStr.toString();
|
||||
}
|
||||
|
||||
|
||||
private void addSlices(Map<String,Slice> target, ClusterState state, SolrParams params, String collectionName, String shardKeys, boolean multiCollection) {
|
||||
DocCollection coll = state.getCollection(collectionName);
|
||||
|
|
Loading…
Reference in New Issue