qzfzz / memcachedb

Automatically exported from code.google.com/p/memcachedb
Other
0 stars 0 forks source link

increment key issue memcachedb-1.0.0.beta #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
php example:
<?php
$memcache = new Memcache;
$memcache->addServer('localhost', 21201);

$memcache->set('key1',7);
$memcache->increment('key1',2);

echo "key1=>".$memcache->get('key1') ."\n";

$memcache->increment('key1',2);

echo "key1=>".$memcache->get('key1') ."\n";
?>

result:

key1=>9
PHP Notice:  get(): marked server 'localhost:21201' as failed in ...
key1=>

telnet differencies:

Telneting into memcached 1.2.2

root@x:~# telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost
Escape character is '^]'.
add aa 0 0 1
9
STORED
incr aa 1
10
get aa
VALUE aa 0 2
10
END

Telneting into memcachedb 1.0.0
root@x:~# telnet localhost 21201
Trying 127.0.0.1...
Connected to localhost
Escape character is '^]'.
add aa 0 0 1
9
STORED
incr aa 1
10
get aa
VALUE aa 0 1
10
END

There's a notable difference between the response from the servers on the
second get
memcached replies with "VALUE aa 0 2"
memcachedb replies with "VALUE aa 0 1" (number of bytes differs)

What version of the product are you using? On what operating system?

Berkeley DB 4.6.18
libevent 1.4.0-beta
memcachedb-1.0.0-beta
Linux

Original issue reported on code.google.com by cocorult...@gmail.com on 19 Feb 2008 at 4:06

GoogleCodeExporter commented 9 years ago
This is a bug, we will fix it.

Original comment by stv...@gmail.com on 20 Feb 2008 at 1:55

GoogleCodeExporter commented 9 years ago
It has been fixed in 1.0.1-beta.

Original comment by stv...@gmail.com on 21 Feb 2008 at 9:25