There are defaults for both replicationFactor and maxShardsPerNode, so
non of them HAS to be provided - default is 1 in both cases.
int repFactor = msgStrToInt(message, REPLICATION_FACTOR, 1);
int maxShardsPerNode = msgStrToInt(message, MAX_SHARDS_PER_NODE, 1);
Remember than replicationFactor decides how many "instances" of you
shard you will get, so a value of 1 does not provide you any replication.
On 1/3/13 3:46 AM, Yonik Seeley wrote:
On Wed, Jan 2, 2013 at 9:21 PM, davers <dboych...@improvementdirect.com> wrote:
So by providing the correct replicationFactor parameter for the number of
servers has fixed my issue.
So can you not provide a higher replicationFactor than you have live_nodes?
Yes, but you will end up with multiple replica of the same shard running
on the same node. It is kinda pointless (IMHO), but might be ok if you
later want to "move" one of the replica to a "new" node. I would prefer
to not allow creating more replica than you have nodes (because it is
kinda pointless) and then just copy data when you, in the future, create
a new replica of a shard on a new node. There is not a big difference
between "moving a replica from one node to another" and "establishing a
new copy of the shard on a new node from an old node". But I guess this
has already been discussed, and current implementation is that it is
allowed to create more replica than you have nodes.
What if you want to add more replicants to the collection in the future?
I advocated that replicationFactor / maxShardsPerNode only be a
target, not a requirement in
https://issues.apache.org/jira/browse/SOLR-4114
and I hope that's in what will be 4.1, but I haven't verified.
-Yonik
http://lucidworks.com