Description
https://www.couchbase.com/issues/browse/CBSE-840
Method MemcachedClient.ExecuteGet(IEnumerable<string> keys) of .NET SDK is returning empty dictionary when none of specified keys were found. And the same result is returned on connection error. So it is not possible to distinguish between these two cases and it's not possible to find what went wrong.
static void Main(string[] args)
{
using (CouchbaseClient client = new CouchbaseClient("ok"))
{
IDictionary<string, IGetOperationResult> res = client.ExecuteGet(new string[]
Console.WriteLine(res.Count);
}
using (CouchbaseClient client = new CouchbaseClient("ok"))
{
IDictionary<string, IGetOperationResult> res = client.ExecuteGet(new string[] { "not-exist1", "not-exist2" });
Console.WriteLine(res.Count);
}
using (CouchbaseClient client = new CouchbaseClient("wrong"))
{
IDictionary<string, IGetOperationResult> res = client.ExecuteGet(new string[] { "exist1", "exist2" }
);
Console.WriteLine(res.Count);
}
using (CouchbaseClient client = new CouchbaseClient("wrong"))
{
IDictionary<string, IGetOperationResult> res = client.ExecuteGet(new string[]
);
Console.WriteLine(res.Count);
}
}
Output is:
2
0
0
0
Tested on Couchbase client 1.2.6.0 and 1.2.9.0.