Activity log for bug #1158676

Date Who What changed Old value New value Message
2013-03-22 08:37:24 Denis Shashkov bug added bug
2013-03-22 08:37:24 Denis Shashkov attachment added strace.log https://bugs.launchpad.net/bugs/1158676/+attachment/3589914/+files/strace.log
2013-03-25 02:27:38 Denis Shashkov description All software is self-builded: PHP 5.3.10 + memcached extension 2.1.0, linked with libmemcached 1.0.14. Running simple PHP-script: <?php $m = new Memcached(); $m->setOption(Memcached::OPT_COMPRESSION, false); $m->setOption(Memcached::OPT_CONNECT_TIMEOUT, 10); $m->setOption(Memcached::OPT_RETRY_TIMEOUT, 1); // ketama options $m->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT); $m->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true); $m->setOption(Memcached::OPT_SERVER_FAILURE_LIMIT, 1); $m->setOption(Memcached::OPT_REMOVE_FAILED_SERVERS, true); $servers = array(); $servers[] = array('127.0.0.1', 11211, 100); $servers[] = array('192.168.0.1', 11212, 100); $m->addServers($servers); for ( $i=0; $i<100; $i++ ) { sleep(1); var_dump($m->set('key', 1)); if ($m->getResultCode() > 0) { if ($m->getResultCode() !== Memcached::RES_NOTFOUND ) { echo $m->getResultMessage().PHP_EOL; } } } ?> After several successful cycles, dropping down second server (192.168.0.1). Expected behavior: 1. After dropping connection and polling timeout, server will be marked as FAULTY. 2. After first connecting attempt, server will be marked as DEAD. Memcached ext./libmemcached will redistribute key to first memcached server (127.0.0.1). Observed behavior: 1. After dropping connection and polling timeout, server is marked as FAULTY? (It's an assumption, cannot check). 2. Memcached ext./libmemcached open connection to first server (127.0.0.1), SUCCESSFULLY stores the key AND getResultMessage returns "SERVER IS MARKED DEAD". (It's normal) 3. At the next cycle, Memcached ext./libmemcached successfully stores the key. (It's normal, too) 4. At the next and further cycles, Memcached ext./libmemcached return FALSE on set() operation and getResultMessage returns "SERVER IS MARKED DEAD". It's hard confusing. Why just using first server further? I check memcached extension's sources and believe it pass ketama options to libmemcached well. So I propose that unexpected behavior is a bug. Or maybe I use invalid option set with memcached extension/libmemcached? All software is self-builded: PHP 5.3.10 + memcached extension 2.1.0, linked with libmemcached 1.0.14. Running simple PHP-script: <?php $m = new Memcached(); $m->setOption(Memcached::OPT_COMPRESSION, false); $m->setOption(Memcached::OPT_CONNECT_TIMEOUT, 10); $m->setOption(Memcached::OPT_RETRY_TIMEOUT, 1); // ketama options $m->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT); $m->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true); $m->setOption(Memcached::OPT_SERVER_FAILURE_LIMIT, 1); $m->setOption(Memcached::OPT_REMOVE_FAILED_SERVERS, true); $servers = array(); $servers[] = array('127.0.0.1', 11211, 100); $servers[] = array('192.168.0.1', 11212, 100); $m->addServers($servers); for ( $i=0; $i<100; $i++ ) {         sleep(1);         var_dump($m->set('key', 1));         if ($m->getResultCode() > 0) {                 if ($m->getResultCode() !== Memcached::RES_NOTFOUND ) {                         echo $m->getResultMessage().PHP_EOL;                 }         } } ?> After several successful cycles, dropping down second server (192.168.0.1). Expected behavior: 1. After dropping connection and polling timeout, server will be marked as FAULTY. 2. After first connecting attempt, server will be marked as DEAD. Memcached ext./libmemcached will redistribute key to first memcached server (127.0.0.1). Observed behavior: 1. After dropping connection and polling timeout, server is marked as FAULTY? (It's an assumption, cannot check). 2. Memcached ext./libmemcached open connection to first server (127.0.0.1), SUCCESSFULLY stores the key AND getResultMessage returns "SERVER IS MARKED DEAD". (It's normal) 3. At the next cycle, Memcached ext./libmemcached successfully stores the key. (It's normal, too) 4. At the next and further cycles, Memcached ext./libmemcached return FALSE on set() operation and getResultMessage returns "SERVER IS MARKED DEAD". It's hard confusing. Why just not using first server further? I check memcached extension's sources and believe it pass ketama options to libmemcached well. So I propose that unexpected behavior is a bug. Or maybe I used invalid option set with memcached extension/libmemcached?
2013-03-27 05:55:19 Denis Shashkov attachment added strace2.log https://bugs.launchpad.net/libmemcached/+bug/1158676/+attachment/3600126/+files/strace2.log
2013-03-27 06:32:13 Denis Shashkov attachment added strace3.log https://bugs.launchpad.net/libmemcached/+bug/1158676/+attachment/3600143/+files/strace3.log
2013-04-19 00:16:23 Brian Aker libmemcached: status New Confirmed
2013-04-19 00:16:45 Brian Aker summary ketama algorithm doesn't work? Better documentation on what happens when memcached instance fails.
2013-04-19 00:20:22 Brian Aker marked as duplicate 1132725