On Thu, Jan 3, 2013 at 8:46 AM, Per Steffensen <st...@designware.dk> wrote:
> 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.

I agree - it's pointless to have two replicas of the same shard on a
single node.  But I'm talking about having replicationFactor as a
target, so when you start up *new* nodes they will become a replica
for any shard where the number of replicas is currently less than the
replicationFactor.

Ideally, one would be able to create a new collection with no nodes
initially assigned to it if desired.

-Yonik
http://lucidworks.com

Reply via email to