Hello,
does high availability work for a Solr sharding with DB_ID_RANGE method ?
I have 3 shards (manually) distributed on 3 Solr nodes with replication factor 2. Here my setup:
- Alfresco Content service 7.4.0.1
- Alfresco Search service : 2.0 with Solr 6
- Sharding Method: DB_ID_RANGE
Solr node 1 (port 8181)
Solr node 2 (port 8282)
Solr node 3 (port 8383)
Alfresco Content Service (alfresco-global.properties)
solr6.store.mappings.value.solrMappingAlfresco.nodeString=solr-host-1:8181/solr/alfresco,solr-host-2:8282/solr/alfresco,solr-host-3:8383/solr/alfresco
solr6.store.mappings.value.solrMappingAlfresco.numShards=3
solr6.store.mappings.value.solrMappingAlfresco.replicationFactor=2
Assuming 1000+ ID rows on my DB, I created the 3 shards (and replicas) with the following ID range:
alfresco-0: 0-400
alfresco-1: 401-800
alfresco-2: 801-1200
All indexes are working fine, because I individually tested each Solr node with some FTS query directly on Solr Rest API (by their query web console). Alfresco-Share works fine as well and the repository looks as expected.
The issue comes after intentionally stopping a Solr node to test the high availability. Alfresco shows this error:
026-02-23T16:17:34,849 [] ERROR [extensions.webscripts.AbstractRuntime] Failed to execute search: PATH:"/app:company_home//*" AND ASPECT:"{http://www.alfresco.org/model/content/1.0}taggable"
Caused by: org.alfresco.repo.search.QueryParserException: 01230759
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.pollConnect(Native Method) ~[?:?]
...
01230037 Solr request failed with 500 /solr/alfresco-2/afts?wt=json&fl=DBID,score&rows=100&shards=http://solr-1:8181/solr/alfresco-0,http://solr-2:8282/solr/alfresco-1,http://solr-3:8383/solr/alfresco-2&df=TEXT&start=0&locale=it&alternativeDic=DEFAULT_DICTIONARY&fq={!afts}AUTHORITY_FILTER_FROM_JSON&fq={!afts}TENANT_FILTER_FROM_JSONPay attention to the Error 500 Response and look at the "shards" url parameter:
shards=http://localhost:8181/solr/alfresco-0,http://localhost:8282/solr/alfresco-1,http://localhost:8383/solr/alfresco-2
It looks like Alfresco builds a shard chain sequentially alfresco-0,alfresco-1,alfresco-2. Is that an expected behaviour for high availability ?