From 71c9d7cc0bddd63a1216beac15f58da1e1245958 Mon Sep 17 00:00:00 2001 From: Mitch Hagstrand Date: Sat, 17 Nov 2012 12:30:55 -0800 Subject: [PATCH 1/2] Removed unused memcached.ini option After the merge of commits 5ff9516240 and faf84af789 the memcached.sess_num_replicas option is no longer used --- memcached.ini | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/memcached.ini b/memcached.ini index f4bd68c0..ef832efc 100644 --- a/memcached.ini +++ b/memcached.ini @@ -35,15 +35,12 @@ memcached.sess_remove_failed = 1 ; from a replica. However, if the failed memcache server ; becomes available again it will read the session from there ; which could have old data or no data at all -memcached.sess_num_replicas = 0; +memcached.sess_number_of_replicas = 0 ; memcached session binary mode ; libmemcached replicas only work if binary mode is enabled memcached.sess_binary = Off -; memcached session number of replicas -memcached.sess_number_of_replicas = 0 - ; memcached session replica read randomize memcached.sess_randomize_replica_read = Off From 3c7aa2596f5de91f74ab096f9eb2da9af91134b8 Mon Sep 17 00:00:00 2001 From: Mitch Hagstrand Date: Fri, 11 Jan 2013 11:22:10 -0800 Subject: [PATCH 2/2] Fixed tests after chanage to php_memc_do_serverlist_callback() The php function getServerList() no longer returns a weight value. The tests have been updated to reflect this change. The need for this change is result of commenting out "add_assoc_long(array, "weight", instance->weight);" in php_memcached.c --- tests/bug_16084.phpt | 4 +--- tests/getserverlist.phpt | 16 ++++------------ tests/invoke_callback.phpt | 4 +--- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/tests/bug_16084.phpt b/tests/bug_16084.phpt index 2c282bb2..c103b297 100644 --- a/tests/bug_16084.phpt +++ b/tests/bug_16084.phpt @@ -13,12 +13,10 @@ var_dump($m->getServerList()); bool(true) array(1) { [0]=> - array(3) { + array(2) { ["host"]=> string(9) "localhost" ["port"]=> int(11211) - ["weight"]=> - int(3) } } diff --git a/tests/getserverlist.phpt b/tests/getserverlist.phpt index 1761f33c..e4ef5968 100644 --- a/tests/getserverlist.phpt +++ b/tests/getserverlist.phpt @@ -20,43 +20,35 @@ array(0) { } array(1) { [0]=> - array(3) { + array(2) { ["host"]=> string(9) "localhost" ["port"]=> int(11211) - ["weight"]=> - int(3) } } array(2) { [0]=> - array(3) { + array(2) { ["host"]=> string(9) "localhost" ["port"]=> int(11211) - ["weight"]=> - int(3) } [1]=> - array(3) { + array(2) { ["host"]=> string(9) "localhost" ["port"]=> int(11211) - ["weight"]=> - int(3) } } array(1) { [0]=> - array(3) { + array(2) { ["host"]=> string(9) "127.0.0.1" ["port"]=> int(11211) - ["weight"]=> - int(%r[01]%r) } } diff --git a/tests/invoke_callback.phpt b/tests/invoke_callback.phpt index 6fddc0c0..d5d0cc90 100644 --- a/tests/invoke_callback.phpt +++ b/tests/invoke_callback.phpt @@ -19,13 +19,11 @@ echo "OK\n"; --EXPECTF-- array(1) { [0]=> - array(3) { + array(2) { ["host"]=> string(9) "127.0.0.1" ["port"]=> int(11211) - ["weight"]=> - int(%r[01]%r) } } OK