Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

don't warn on db creation#11

Open
robertkowalski wants to merge 1 commit intoapache:masterfrom
robertkowalski:2594-2598-number-of-nodes
Open

don't warn on db creation#11
robertkowalski wants to merge 1 commit intoapache:masterfrom
robertkowalski:2594-2598-number-of-nodes

Conversation

@robertkowalski
Copy link
Copy Markdown
Member

do not warn on db creation if the user runs a
"single-node-cluster". given the suggestions i got on IRC
currently the best way is not to modify N and just let it default
to three, also for a cluster-of-one.

This closes COUCHDB-2594

This superseeds apache/couchdb-setup#4

do not warn on db creation if the user runs a
"single-node-cluster". given the suggestions i got on IRC
currently the best way is not to modify N and just let it default
to three, also for a cluster-of-one.

This closes COUCHDB-2594
@kxepal
Copy link
Copy Markdown
Member

kxepal commented Jul 24, 2015

I worry about the following: that warning existed with some meaning, for some reason. In fact, it could notice that cluster is in "incomplete" state what may explain various errors and failures. If so, may be add special clause for NodeCount=1, but keep the warning for else? If my worries are false - go ahead (:

@robertkowalski
Copy link
Copy Markdown
Member Author

that's a really cool idea, i can do that on monday if no one else objects

@robertkowalski
Copy link
Copy Markdown
Member Author

ping @rnewson @chewbranca @banjiewen

@b20n
Copy link
Copy Markdown
Contributor

b20n commented Jul 27, 2015

The error exists because N is ~silently reduced to NodeCount.

To quote @rnewson's comment in the related ticket, which I still believe is definitive here:

A strong mechanism would be to remove the silent reduction of N when creating a database, to instead return a 400 or 500 error message (we'll have to bikeshed a little on whether the user is in error for asking for more replicas than the cluster can create or the server is in error for not having enough nodes to satisfy the user).
When choosing "single node" in setup, the default N value should be set to 1, so that database creations do not return the error.

IMO removing the error is all fine and good - it's not really the crux of the interest here. If there's a "Single Node Mode", that should set N to 1, and N should never be silently reduced.

@rnewson
Copy link
Copy Markdown
Member

rnewson commented Jul 27, 2015

The problem with changing N is forgetting to change back up when adding nodes. Silently making N=1 dbs when you have one node is infinitely preferable to making N=1 dbs when you have three nodes or more.

The reason we log is so that the observant admin can notice that they didn't join their multi-node cluster up properly, but I don't think it's a very good mechanism.

Of all the options, the best one is to leave things as they are. Someone with a single node 'cluster' will see warnings for this and learn to ignore them (since they don't apply to them). For everyone else, it helps them avoid a data loss scenario, if they read their logs.

The second best option is to remove the warning, which is what I advocate for given the number of voices that dislike the warning.

All other options involve more work and just change one compromise into another one.

@janl
Copy link
Copy Markdown
Member

janl commented Apr 17, 2016

How about this for a compromise?

  1. make this a warning and not an error
  2. add a clause about “if you run a single-node instance, ignore this” (wording TBD)

@rnewson
Copy link
Copy Markdown
Member

rnewson commented Apr 17, 2016

+1

asfgit pushed a commit that referenced this pull request Apr 17, 2016
@janl
Copy link
Copy Markdown
Member

janl commented Apr 17, 2016

See #20 for new PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants