Writing to the wrong bucket


Working with Couchbase 4.5.0-2601, and .NET client 2.4.6.
The following only happens on my Production environment, not on the test server and not on my local machine.
(Prod has a cluster of 3 nodes, all others have 1 node).
My application should only write to one bucket. I have other buckets on the server that are used by other apps.
Some of the documents are being written to my bucket, and some are written to the default bucket. I can’t figure any rule on when each document is written to each bucket.
My code only has one IBucket object, and one Cluster object (using a singleton).
This code initializes the bucket and cluster objects, I then use Upsert on that IBucket object.

List<Uri> servers = new List<Uri>();
servers.Add(new Uri("http://cb-ip-1:8091/pools/default"));
servers.Add(new Uri("http://cb-ip-2:8091/pools/default"));
servers.Add(new Uri("http://cb-ip-3:8091/pools/default"));
JsonSerializerSettings serializerSettings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All };
ClientConfiguration config = new ClientConfiguration
	Servers = servers,
	Serializer = () => new DefaultSerializer(serializerSettings, serializerSettings),
	PoolConfiguration = new PoolConfiguration
		MaxSize = 10,
		MinSize = 5,
		SendTimeout = 12000
cluster = new Cluster(config);
bucket = cluster.OpenBucket("my-bucket");


Hi @gilad.teller

This is a known issue for SDK client version 2.4.6 and had been de-listed on nuget.org because of it. Please update to SDK version 2.4.7 where this has been resolved.



Thanks for the quick reply!
I will update here as soon as I get this to prod and see if the issue is fixed.
Yes, as soon as I deployed the app with SDK 2.4.7, all documents are being written to my-bucket.