Affects Version/s: None
Fix Version/s: None
Issue is raised by a customer in ticket CBSE-341 (http://www.couchbase.com/issues/browse/CBSE-341), the details are mentioned in the ticket itself.
Following are the observations related to the issue:
--> when we create a client with bucket which doesn't exist, the error message should be more appropriate like "Bucket does not exist" and the code should simply exit with a false status. Currently it throws an exception and the error message that comes is "Object reference not set to an instance of an object.".
Error source : Couchbase.CouchbasePool.Enyim.Caching.Memcached.IServerPool.Locate(String key)
Couchbase.CouchbaseClient.PerformStore(StoreMode mode, String key, Object value, UInt32 expires, UInt64& cas, Int32& statusCode)
Enyim.Caching.MemcachedClient.Store(StoreMode mode, String key, Object value)
May be we need to add some condition that checks whether node (returned from Locate()) in null or not. If null, it should not proceed further to perform store operation. It should return apt message and simply exit with false status.
--> Rebalance operation takes quite some time. During this operation, the server nodes may become unavailable for sometime or even get removed from the cluster and hence the bucket is also not available. Exception is thrown "Object reference not set to an instance of an object)". Error source same as above : Couchbase.CouchbasePool.Enyim.Caching.Memcached.IServerPool.Locate(String key)
--> Refer to the attached sample code, I used my cluster which has following server nodes:
In the code Program.cs, use the bucket name that does not exist, the code will throw the exception.
Next use the correct bucket name but manually fail over a node & start rebalance. It will throw the exception.