pulibrary / pdc_discovery

Princeton Data Commons discovery portal for Research Data
10 stars 0 forks source link

Replication factor for Solr in production and staging #584

Closed hectorcorrea closed 3 months ago

hectorcorrea commented 5 months ago

Anna recommended that we update our Solr to have replication factor of 3 instead of 2 (see slack https://pulibrary.slack.com/archives/CL8F616KV/p1711034808609289)

I just updated a staging collection from a replication factor of 2 to 3. Collections with replication 
favor of 2 were a complication with all this crashing solr staging stuff. I recommend everyone do 
this if your team has collections with replication factor 2. It's pretty straightforward, you can add 
a shard in the UI and you can use this curl command to update the value of the replication factor: 
(updating to post 8.4 docs, but the command is the same in this case) 
https://solr.apache.org/guide/8_4/collection-management.html#modifycollection 
...
In the new staging solr cluster it looks like dss, pdc-discovery, and special collections have 2 shards.

Our solr_cloud_helper.rb is currently hardcoded to 2: https://github.com/pulibrary/pdc_discovery/blob/main/lib/traject/solr_cloud_helper.rb#L113