Details
-
Improvement
-
Resolution: Unresolved
-
Critical
-
6.5.1, 6.6.0, 6.5.0
-
1
Description
If you do a durable write in a single node cluster, a 'durability impossible' exception gets thrown back.
This is because by default the number of replicas for a new bucket = 1. Hence, in a single node cluster it is impossible to achieve majority (which is 2 nodes if you have 1 replica).
This is undesirable out-of-box experience as many developers will play with single node clusters.
In discussion with Dave Rigby here are some of the things he suggested:
In terms of improving this experience, I see two approaches:
1. Change the default number of replicas in the “Create Bucket” to zero (perhaps only if there’s one node currently in the cluster?).
2. Have ns_server somehow modify the chain it presents to KV-Engine - maybe capping the number of elements in the chain based on the total node count (i.e. until you add more than 1 node the chain just has one element).
__
Option (2) could be interesting - given you’d have to rebalance anyway if you wanted to add a second node and start using it, having the chain smaller until the rebalance occurs would I think address this (and similar issues when changing replica counts to >1).
The problem I see with Option 1 is (as pointed out by DaveR again) is that every cluster will start out as a single node cluster (users will add nodes to a single node). Hence, existing users will be thrown off if we change the default replicas to zero (as well as end up with unsafe clusters). Hence Option 2 may be the only real choice.
Filing it under KV, but probably involves ns_server work too.
Dave Finlay FYI