Why couchbase c sdk can not connect to a host list if the first host is not in the same cluster with others?


#1

I have 3 hosts with couchbase installed

  1. The first, make the host1, host2 and host3 in the same cluster2,
    then removal the host1 from cluster and reblance, now :
    host1 is in not in cluster,
    host2 and host3 in cluster2

  2. Specify the hosts in C SDK as follows,
    create_options.v.v0.host = "host1:8091;host2:8091;host3:8091"
    create_options.v.v0.bucket = cluster2

then invoking the lcb_connect() function, it return an error in error_callback() function as follows,

ERROR: No such bucket (0x19), HTTP/1.1 404 Object Not Found
Server: Couchbase Server 2.0.1-170-rel-enterprise
Pragma: no-cache
Date: Wed, 03 Jul 2013 05:12:28 GMT
Content-Length: 31
Cache-Control: no-cache

But if the host2 is as the first host, the lcb_connect() is successed.

Why the the first lcb_connect() is failed, it can’t skip the hosts those not in the cluster?


#2

You should pass only hosts from the same cluster to lcb_create


#3

but if the host which is not at the first postion works ok,
which is a bug?