Re: What does replicationFactor really do?

2015-07-16 Thread Shawn Heisey
On 7/16/2015 10:46 AM, Jim.Musil wrote:
> In 5.1, we are creating a collection using the Collections API with an 
> initial replicationFactor of X. This value is then stored in the state.json 
> file for that collection.
>
> If I try to issue ADDREPLICA on this cluster, it throws an error saying that 
> there are no live nodes for additional replicas.
>
> If I connect a new solr node to zookeeper and issue an ADDREPLICA call, the 
> replica is created and no errors are thrown, but replicationFactor remains at 
> X in the state.json file.
>
> Why? What does replicationFactor really mean? It seems like it's being 
> honored in some cases and ignored in others.

I believe what I'm saying below is correct.  Hopefully someone with more
knowledge will speak up if I'm wrong.

If you're not using a shared filesystem (which I think right now is only
HDFS), then the only time replicationFactor is used is at collection
creation time.  It won't affect anything that happens later.

If you ARE using HDFS, then there is a feature called autoAddReplicas
which will detect when your replica count is below replicationFactor and
automatically add more replicas until you're back in compliance.  I know
almost nothing about this feature.  Here is the issue where it was added
and the page in the reference guide where the feature is mentioned:

https://issues.apache.org/jira/browse/SOLR-5656
https://cwiki.apache.org/confluence/display/solr/Running+Solr+on+HDFS

Thanks,
Shawn



What does replicationFactor really do?

2015-07-16 Thread Jim . Musil
Hi,

In 5.1, we are creating a collection using the Collections API with an initial 
replicationFactor of X. This value is then stored in the state.json file for 
that collection.

If I try to issue ADDREPLICA on this cluster, it throws an error saying that 
there are no live nodes for additional replicas.

If I connect a new solr node to zookeeper and issue an ADDREPLICA call, the 
replica is created and no errors are thrown, but replicationFactor remains at X 
in the state.json file.

Why? What does replicationFactor really mean? It seems like it's being honored 
in some cases and ignored in others.

Thanks for any help you can provide.

Cheers,
Jim