Handling node removal / rebalance

#1

Hello we create a cluster / bucket like so:

var cluster = new couchbase.Cluster(connStr);

where connStr is something like:

'http://host1.db.mycompany.com:8091,host2.db.mycompany.com:8091,host3.db.mycompany.com:8091,host4.db.mycompany.com:8091'

and then open bucket using normal openBucket call.

Env:
Couchbase server version 2.5.0.
Couchnode: 2.0.8
Node.js 0.10.29
npm: 1.4.14 ( :frowning: )
OS: CentOS 6.5

Basically we are doing upgrade of couchbase server, one host at a time. Basic process is: remove node / rebalance, upgrade couchbase server, add node / rebalance. The upgrade is from version 2.5.0 to version 2.5.2. We started with upgrading host 4 only and when we were doing it we started getting errors:

no_active_vbuckets: Cannot execute view query since the node has no active vbuckets

and:

connect ECONNREFUSED

and:

Error: open_db_failed: {not_found,no_db_file}

Is the Node client suppose to handle node removal / rebalance like this automatically? Anything we can do to work around the node removal?

Thanks

#2

Hey bojand,

The Node.js SDK is capable of handling node removal, adding and rebalancing without affecting your application. It does however appear that there is some issue preventing this from happening properly. Have you tried simply retrying the view query after receiving an error in this case?

Cheers, Brett