Closed GoogleCodeExporter closed 9 years ago
Original comment by ingen...@gmail.com
on 24 Oct 2011 at 10:31
What client is this with? I think it may be something rather ancient.
With the Whalin Memcached-Java-Client, and this (more correct) code, I get
something similar. Seems like a client bug, but I'm not certain.
public static void main(String[] args) {
MemcachedClient mc = new MemcachedClient();
String key = "counterKey";
mc.storeCounter(key, 10L);
System.out.println(mc.incr(key, 1L));
System.out.println(mc.incr(key, 1L));
System.out.println(mc.get(key));
System.out.println(mc.getCounter(key));
-1
-1
null
-1
With correct code using the spymemcached client, I get expected results.
spymc.set("spy" + key, 0, "10");
System.err.println(spymc.get("spy" + key));
System.err.println(spymc.incr("spy" + key, 1L));
System.err.println(spymc.incr("spy" + key, 1L));
System.err.println(spymc.get("spy" + key));
10
11
12
12
In any event, it appears to not be a server bug.
Original comment by ingen...@gmail.com
on 25 Oct 2011 at 12:32
Original issue reported on code.google.com by
litiey...@gmail.com
on 24 Oct 2011 at 9:16