Details
Description
CloudSolrServer’s cached state is not being updated for a newly created collection if we started polling for the collection state too early and a "down" state is cached. Requests to the newly created collection continues to fail with "No live SolrServers available to handle this request" until the cache is invalidated by time.
Logging on the client side reveals that while the state in ZkStateReader is updated to "active", the cached state in CloudSolrServer remains in "down".
CloudSolrServer cached state:
DocCollection(collection-1418250319268)={
"shards":{"shard1":{
"range":"80000000-7fffffff",
"state":"active",
"replicas":{"core_node1":{
"state":"down",
"base_url":"http://localhost:8983/solr",
"core":"collection-1418250319268_shard1_replica1",
"node_name":"localhost:8983_solr"}}}},
"maxShardsPerNode":"1",
"external":"true",
"router":Unknown macro: { "name"},
"replicationFactor":"1”}ZkStateReader state:
DocCollection(collection-1418250319268)={
"shards":{"shard1":{
"range":"80000000-7fffffff",
"state":"active",
"replicas":{"core_node1":{
"state":"active",
"base_url":"http://localhost:8983/solr",
"core":"collection-1418250319268_shard1_replica1",
"node_name":"localhost:8983_solr",
"leader":"true"}}}},
"maxShardsPerNode":"1",
"router":Unknown macro: { "name"},
"external":"true",
"replicationFactor":"1”}