1
votes

I had to take a 4.3.1 single solr index and migrate it to solrcloud 5.2.1.
The new 5.2.1 architecture is 2 shards, each shard has 1 master and 1 slave (replica). My steps were:

  • Setup new single sharded solrcloud 5.2.1.
  • Take the big index data folder, migrate it to the single shard solrcloud 5.2.1, with 1 shard/core.
  • Split index.
  • Copy the 2 data folders to a new solrcloud 5.2.1 installation (a fresh installation with 2 shards, 1 master 1 replica).

I also have the configuration schema.xml/solrconfig.xml in a single ZooKeeper (i am aware 1 ZK is not recommended).

Everything went fine, the shards are running, the replicas contains the data, I can query the data from new solrcloud 5.2.1 2 shards.

When I Add new document, the replica is not working. I have defined a Replication Handler, but i cannot determine who is master and who is slave, since this is hosted in the Zookeeper, and the Zookeeper is responsible for all configuration. I have 2 masters and 2 slaves, And I can't decide which is master and who is slave. This is the election process goal.

What should i do? Do i understand the process right?

I have read this: How do I configure Solr replication with multiple cores. But my problem is that I am using zookeeper.

1

1 Answers

0
votes

The flow is valid and has finally worked.
The reason replication did not work was because we had invalid parameter in the updateLog section of solrconfig.
The default solrconfig.xml contains the following in the updateLog:

<updateLog>
  <str name="dir">${solr.ulog.dir:}</str>
</updateLog>  

Solr instructs in their guide to use when using legacy configuration (and now it works):

<updateLog>
  <str name="dir">${solr.data.dir:}</str>
</updateLog>

It is advised to read this and mind all details carefully:

https://cwiki.apache.org/confluence/display/solr/SolrCloud+with+Legacy+Configuration+Files