Hello, I've been trying to debug something for a while. I have an app written in c using libmemcached.
First i increment a key, if it returns not found, i set the key to a value of one. Next up i want to decrease the value of the previously stored key, but it returns not found, while the key is successfully stored. I've been verifying this using tcpdump but can't see anything wrong with it. First there's the increment: (key="tommy32200.conns") 0x0030: 889a 52af 696e 6372 2074 6f6d 6d79 3332 ..R.incr.tommy32 0x0040: 3230 302e 636f 6e6e 7320 310d 0a 200.conns.1.. Which returns not found (as expected): 0x0030: 1d79 18ea 4e4f 545f 464f 554e 440d 0a .y..NOT_FOUND.. So i set the key to a value of "1" 0x0030: 889a 52af 7365 7420 746f 6d6d 7933 3232 ..R.set.tommy322 0x0040: 3030 2e63 6f6e 6e73 2030 2031 3235 3536 00.conns.0.12556 0x0050: 3837 3239 3220 310d 0a31 0d0a 87292.1..1.. Which seems successfull (also as expected). 0x0030: 1d79 18ea 5354 4f52 4544 0d0a .y..STORED.. Then i want to decrease the value: 0x0030: 889a 52af 6465 6372 2074 6f6d 6d79 3332 ..R.decr.tommy32 0x0040: 3230 302e 636f 6e6e 7320 310d 0a 200.conns.1.. But it returns not found. 0x0030: 1d79 18eb 4e4f 545f 464f 554e 440d 0a .y..NOT_FOUND.. I was expecting the last decr to return "0", which it most of the time does, but not always, which is weird. Any clue about this? I'm running memcached 1.4.2 (but i experience this issue sincs 1.2.8 atleast). Also memcached isn't using even half of it's memory during my tests: nobody 17142 14.7 0.8 535356 66248 ? S<sl 11:37 10:15 /usr/local/bin/memcached -d -m 1024 -u nobody -c 25600 -P /var/run/memcached.pid -t 8 Thanks, Tommy
