ahww520 / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
0 stars 0 forks source link

Incr/Decr on non-numeric value #191

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Incr/Decr on non-numeric value
2.
3.

What is the expected output? What do you see instead?
mc.set("test.mc.count", 0, 1l);
System.err.println(mc.get("test.mc.count"));  //1
final long incr = mc.incr("test.mc.count", 2);

net.rubyeye.xmemcached.exception.MemcachedServerException: Incr/Decr on 
non-numeric value.
    at net.rubyeye.xmemcached.command.binary.BaseBinaryCommand.readStatus(BaseBinaryCommand.java:264)
    at net.rubyeye.xmemcached.command.binary.BaseBinaryCommand.readHeader(BaseBinaryCommand.java:195)
    at net.rubyeye.xmemcached.command.binary.BaseBinaryCommand.decode(BaseBinaryCommand.java:121)

What version of the product are you using? On what operating system?
xmemcached-1.3.6. 

Please provide any additional information below.

Original issue reported on code.google.com by niuqiang...@gmail.com on 16 Apr 2012 at 3:29

GoogleCodeExporter commented 8 years ago
Use

  mc.set("test.mc.count",0,"11")

instead.

Original comment by killme2...@gmail.com on 16 Apr 2012 at 3:44

GoogleCodeExporter commented 8 years ago
value的类型必须得是String类型的吗?有什么特别的意义没有?
另外可不可以将client设成守护线程?

Original comment by niuqiang...@gmail.com on 16 Apr 2012 at 6:28