If i check a big list of keys if exists on cache is random true or false.
The KeyState is FoundNotPersisted. I have two nodes with 39.915.048 items.
var cache = new Couchbase.CouchbaseClient();
//for (int i = 0; i < 10000000; i++)
Parallel.For(0, 10000000, i =>
{
if (cache.KeyExists("key1234"))
{
Console.WriteLine("cache nok {0}", i);
}
if (cache.KeyExists("key4321"))
{
}
});
Are you saying you expect these to be there and some that you expect there are not?
If you do an ExecuteGet(), does the item come back?
I add the ExecuteGet method after the key exists. Same result you can see in screenshots. For information my test server have 24 cores. The same test on a other server with 4 cores have the same result. It is important to run the software more as a minute the failures comes after a minute.
public void Start()
{
var cache = new Couchbase.CouchbaseClient();
//key1234 = exists
//key4321 = not exists
//for (int i = 0; i < 10000000; i++)
Parallel.For(0, 10000000, i => {
if (!cache.KeyExists("key1234"))
{
Console.WriteLine("cache nok, item exists but not found {0}", i);
}
if (cache.KeyExists("key4321"))
{
Console.WriteLine("cache nok, item not exists but found {0}", i);
var result = cache.ExecuteGet("key4321");
Console.WriteLine(result.HasValue);
}
});
}