FYI, I succeeded at using SPLITSHARD operation after renaming my core.

My core was named the same as the collection name and the split shard operation 
was looking for a metric with key "solr.core.collectionName.shard1.null" while 
the metrics available for the core was with key 
"solr.core.collectionName.shard1.core_nodeNN".
I renamed my core (with Core API on all nodes) to something like 
"<collectionName>_shard1", and then both metrics keys and SPLITSHARD keys 
computation was the same and it allowed SPLITSHARD operation to work.

Relevant part of the SPLITSHARD command code is at 
https://github.com/apache/lucene-solr/blob/e7522297a70674662f1083f9942403bac3119693/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientNodeStateProvider.java#L156
 and 
https://github.com/apache/lucene-solr/blob/e7522297a70674662f1083f9942403bac3119693/solr/solrj/src/java/org/apache/solr/common/util/Utils.java#L648.
We are assuming that a core is named like "collection1_shard1_1_replica1" or at 
least starts with the same name as the collection + other characters.
=> Is this assumption really correct?

Maybe it's due to some legacy stuff on our side but the name of our cores is 
manually chosen with core.properties file and AFAIK It's never mentionned 
anywhere that cores should have a particular name.

Regards,
Gaël

________________________________
De : Gael Jourdan-Weil <gael.jourdan-w...@kelkoogroup.com>
Envoyé : jeudi 26 septembre 2019 17:57
À : solr-user@lucene.apache.org <solr-user@lucene.apache.org>
Objet : RE: How to split a shard?

Thanks for your answer Shawn, let's use the Collections API only then :)

Any idea what could cause the "missing index size information for parent shard 
leader" error message?

Regards,
Gaël
________________________________
De : Shawn Heisey <apa...@elyograg.org>
Envoyé : jeudi 26 septembre 2019 16:58
À : solr-user@lucene.apache.org <solr-user@lucene.apache.org>
Objet : Re: How to split a shard?

On 9/26/2019 8:50 AM, Gael Jourdan-Weil wrote:
> We are trying to split a single shard into two but we are encountering some 
> issues we don't understand.

<snip>

> A) Create a new core "col_core2", then run the SPLIT 
> (https://lucene.apache.org/solr/guide/7_6/coreadmin-api.html#coreadmin-split)

If you are running SolrCloud, do NOT use the CoreAdmin API.  Use of the
CoreAdmin API on SolrCloud will lead to problems.

Use the Collections API only.

https://lucene.apache.org/solr/guide/7_6/collections-api.html#splitshard

Thanks,
Shawn

Reply via email to