Description
with Enterprise Edition 7.0.0 build 4554 with couchbase latest: 3.1.1
1) this code:
async function go() {
|
const cluster = new couchbase.Cluster("couchbase://localhost", { |
username: "Administrator", |
password: "password", |
});
|
|
// const bucket = cluster.bucket("travel-sample"); |
|
const bucketMgr = cluster.buckets(); |
await bucketMgr.createBucket({
|
name: "hello", |
flushEnabled: false, |
replicaIndex: false, |
ramQuotaMB: 100, |
numReplicas: 0, |
bucketType: couchbase.BucketType.Couchbase,
|
});
|
await bucketMgr.dropBucket("hello");} |
raises "Error: You must have one open bucket before you can perform queries."
However it's documented that this only applies for versions older than 6.5?
2) uncommenting the `const bucket` declaration makes the code work, if the bucket exists.
3) uncommenting the `const bucket` declaration with a bucket that does not exist, ends with a "Error: cluster object was closed" error.
(obviously this is User Error... But it's confusing as the bucket connection shouldn't be needed, isn't used, and the error message is misleading.)
I believe this is the confusion behind https://issues.couchbase.com/browse/DOC-7990
So far seems to be just affecing Node SDK? I couldn't replicate in cbshell, and David Kelly has tested "works fine without opening a bucket first, on 7.0.0 build 4797, and a 6.6.1
That’s with the current master on LCB
Same thing with the current python sdk and current bundled lcb (3.0.6)"