enyim/EnyimMemcached — Issue #86: Increment/Decrement not working as expected
Author: lordfist
Created: 2011-10-29 02:19:18+00:00
State: open

Here is the problem:

Lets imagine 2 scenarios, in one I start with:

ulong val = Global.ClientPool.Client.Increment("testInt", 0, 1);

and call this ++ times afterwards. Now this works as expected and returns me correct values.

BUT

If I call this first:

Global.ClientPool.Client.Store(Enyim.Caching.Memcached.StoreMode.Set, "testInt", (ulong)0);

and then call

ulong val = Global.ClientPool.Client.Increment("testInt", 0, 1);

++ times it ALWAYS returns 0 as value.

This is clearly a bug and needs fixing asap or very big red letters that you cannot combine Store method with Increment/Decrement methods!!!

This also means that I cannot "RESET" the counter to 0 but need to Remove and then use Increment again...

Also note ANY CALLING on Store method afterwards does the same...

Also note that afterwards when trying to use typed Get (even if T is ulong) on that key (or normal Get) fails inside the Memcached client with type conversion error on line 119 in MemCachedClient.cs

This is serious issue please fix!!!