In a bucket we dont have any documents, and bucket-list command for that bucket returns empty bucket map, which means 0 vbuckets.
Earlier we never saw 0 vbuckets even if bucket was empty.
Can a bucket have 0 vbuckets ?
A bucket can not have 0 vbuckets. What I think is happening is that you have a timing issue in your scripts. REST API calls in Couchbase are currently asynchronous. I’m guessing that what is happening is that you are creating a bucket and then trying to get the bucket map. The REST call will return success once the call was accepted, but it might take a little bit more time before the bucket is fully created. As a result all of the data for that bucket might not be available right away.
This is something we are working towards fixing by providing a synchronous as well as an asynchronous API for our REST interfaces, but we haven;t completed this work yet.