1. With the patch we check if the replica is active, we should also also check if the replica's nodeName belongs in the live nodes list. This is required for a scenario like this - Someone kills the node using "kill -9 <pid>" / OOM crash . In the cluster state that replica will still show us "active". HttpSolrCall#getCoreByCollection does the same thing
Very nice suggestion, I Will update it now.
2. Maybe move the code into a function - say "getActiveReplicasForCollection" ? The both CloudSolrStream and ParallelSteam can reuse it.
Cant do that. In ParallelStream, we just wanna find enough workers, dont care about what collection/shard that replica belong to. In CloudSolrStream, for each collection we will randomly find a replica per shard.