You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/07/26 04:39:40 UTC

[GitHub] [couchdb-nano] hamedminaee opened a new issue #228: Can I create a couchdb database with shard param?

hamedminaee opened a new issue #228:
URL: https://github.com/apache/couchdb-nano/issues/228


   If I want to create a couch db with curl setting a shard number I need I do it this way:
   
   curl -X PUT http://test:test@127.0.0.1:5984/test-1?q=20
   
   
   However when I create a db using couch I do not know how to pass q=20. Is it possible to do so in Nano?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-nano] wohali commented on issue #228: Can I create a couchdb database with shard param?

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #228:
URL: https://github.com/apache/couchdb-nano/issues/228#issuecomment-664098664


   If it is a single, standalone server, you can't change `n` from its default value of `1`.
   
   CouchDB won't allow creation of multiple replicas on a single server. To have 5 copies, you'd need at least 5 servers in your cluster.
   
   Also, nowhere do we recommend that `n` should be `q/2`. By default, on a 3-node server, CouchDB 2.x creates `q=8, n=3` databases, and 3.x uses `q=2, n=3`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-nano] hamedminaee closed issue #228: Can I create a couchdb database with shard param?

Posted by GitBox <gi...@apache.org>.
hamedminaee closed issue #228:
URL: https://github.com/apache/couchdb-nano/issues/228


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-nano] janl commented on issue #228: Can I create a couchdb database with shard param?

Posted by GitBox <gi...@apache.org>.
janl commented on issue #228:
URL: https://github.com/apache/couchdb-nano/issues/228#issuecomment-663970142


   Looks like you can pass options: https://github.com/apache/couchdb-nano/blob/master/lib/nano.js#L353
   
   Can you try this: `nano.db.create('foo', {q:1})`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-nano] wohali edited a comment on issue #228: Can I create a couchdb database with shard param?

Posted by GitBox <gi...@apache.org>.
wohali edited a comment on issue #228:
URL: https://github.com/apache/couchdb-nano/issues/228#issuecomment-664098664


   If it is a single, standalone server, you can't change `n` from its default value of `1`.
   
   CouchDB won't allow creation of multiple replicas on a single server. To have 5 copies, you'd need at least 5 servers in your cluster.
   
   Also, nowhere do we recommend that `n` should be `q/2`. By default, on a 3-node cluster, CouchDB 2.x creates `q=8, n=3` databases, and 3.x uses `q=2, n=3`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-nano] hamedminaee commented on issue #228: Can I create a couchdb database with shard param?

Posted by GitBox <gi...@apache.org>.
hamedminaee commented on issue #228:
URL: https://github.com/apache/couchdb-nano/issues/228#issuecomment-692827883


   Thank you 🙏 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-nano] hamedminaee commented on issue #228: Can I create a couchdb database with shard param?

Posted by GitBox <gi...@apache.org>.
hamedminaee commented on issue #228:
URL: https://github.com/apache/couchdb-nano/issues/228#issuecomment-664057755


   @janl Thanks a lot yes that worked. :)
   A quick question when I pass this:  this._db.create(databaseName, {q:10, n:5}). I can see q is 10 for created db but n is is still 1 rather than 5. However I do n ot think it is a nano issue as when I do the same with curl still n is 1. Is there any criteria for running couch to be able to set n to a higher number? Because by convention they say n should be q/2 so if my q is 10 I want n to be 5 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org