Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Removed unused memcached.ini option #44

Closed
wants to merge 6 commits into from

1 participant

@mhagstrand

After the merge of commits 5ff9516 and faf84af
the memcached.sess_num_replicas option is no longer used

Mitch Hagstrand added some commits
Mitch Hagstrand Removed unused memcached.ini option
After the merge of commits 5ff9516 and faf84af
the memcached.sess_num_replicas option is no longer used
71c9d7c
Mitch Hagstrand 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
3c7aa25
Mitch Hagstrand Removed memcached.sess_consistent_hashing option.
1. Removed memcached.sess_consistent_hashing which is a lesser version  of memcached.sess_consistent_hash
2. Added default value for memcached.sess_consistent_hash
7e3bc8b
Mitch Hagstrand Merge branch 'php-memcached-master' 6fc0aee
Mitch Hagstrand Merge branch 'FixTestsAfterWeightRemoved' 3cd8abe
Mitch Hagstrand Merge branch 'FixIssue53' dcea32c
@mhagstrand

Closing because this was a pull request against my master branch. Will re-open as a pull request against a seperate branch.

@mhagstrand mhagstrand closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 17, 2012
  1. Removed unused memcached.ini option

    Mitch Hagstrand authored
    After the merge of commits 5ff9516 and faf84af
    the memcached.sess_num_replicas option is no longer used
Commits on Jan 11, 2013
  1. Fixed tests after chanage to php_memc_do_serverlist_callback()

    Mitch Hagstrand authored
    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
Commits on Jan 14, 2013
  1. Removed memcached.sess_consistent_hashing option.

    Mitch Hagstrand authored
    1. Removed memcached.sess_consistent_hashing which is a lesser version  of memcached.sess_consistent_hash
    2. Added default value for memcached.sess_consistent_hash
Commits on Jan 30, 2013
  1. Merge branch 'php-memcached-master'

    Mitch Hagstrand authored
  2. Merge branch 'FixTestsAfterWeightRemoved'

    Mitch Hagstrand authored
  3. Merge branch 'FixIssue53'

    Mitch Hagstrand authored
This page is out of date. Refresh to see the latest.
View
5 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
View
3  php_memcached.c
@@ -292,7 +292,6 @@ PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("memcached.sess_number_of_replicas", "0", PHP_INI_ALL, OnUpdateLongGEZero, sess_number_of_replicas, zend_php_memcached_globals, php_memcached_globals)
STD_PHP_INI_ENTRY("memcached.sess_randomize_replica_read", "0", PHP_INI_ALL, OnUpdateBool, sess_randomize_replica_read, zend_php_memcached_globals, php_memcached_globals)
- STD_PHP_INI_ENTRY("memcached.sess_consistent_hashing", "0", PHP_INI_ALL, OnUpdateBool, sess_consistent_hashing_enabled, zend_php_memcached_globals, php_memcached_globals)
STD_PHP_INI_ENTRY("memcached.sess_remove_failed", "0", PHP_INI_ALL, OnUpdateBool, sess_remove_failed_enabled, zend_php_memcached_globals, php_memcached_globals)
#endif
STD_PHP_INI_ENTRY("memcached.compression_type", "fastlz", PHP_INI_ALL, OnUpdateCompressionType, compression_type, zend_php_memcached_globals, php_memcached_globals)
@@ -3047,7 +3046,7 @@ static void php_memc_init_globals(zend_php_memcached_globals *php_memcached_glob
#ifdef HAVE_MEMCACHED_SESSION
MEMC_G(sess_locking_enabled) = 1;
MEMC_G(sess_binary_enabled) = 1;
- MEMC_G(sess_consistent_hashing_enabled) = 0;
+ MEMC_G(sess_consistent_hash_enabled) = 0;
MEMC_G(sess_number_of_replicas) = 0;
MEMC_G(sess_remove_failed_enabled) = 0;
MEMC_G(sess_prefix) = NULL;
View
5 php_memcached.h
@@ -70,7 +70,8 @@ ZEND_BEGIN_MODULE_GLOBALS(php_memcached)
int sess_number_of_replicas;
zend_bool sess_randomize_replica_read;
zend_bool sess_remove_failed_enabled;
- zend_bool sess_consistent_hashing_enabled;
+ zend_bool sess_consistent_hash_enabled;
+ zend_bool sess_binary_enabled;
#endif
char *serializer_name;
enum memcached_serializer serializer;
@@ -83,8 +84,6 @@ ZEND_BEGIN_MODULE_GLOBALS(php_memcached)
#if HAVE_MEMCACHED_SASL
bool use_sasl;
#endif
- zend_bool sess_consistent_hash_enabled;
- zend_bool sess_binary_enabled;
ZEND_END_MODULE_GLOBALS(php_memcached)
PHP_MEMCACHED_API zend_class_entry *php_memc_get_ce(void);
View
7 php_memcached_session.c
@@ -228,13 +228,6 @@ PS_OPEN_FUNC(memcached)
}
}
- if (MEMC_G(sess_consistent_hashing_enabled)) {
- if (memcached_behavior_set(memc_sess->memc_sess, MEMCACHED_BEHAVIOR_KETAMA, (uint64_t) 1) == MEMCACHED_FAILURE) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to set memcached consistent hashing");
- return FAILURE;
- }
- }
-
/* Allow libmemcached remove failed servers */
if (MEMC_G(sess_remove_failed_enabled)) {
if (memcached_behavior_set(memc_sess->memc_sess, MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS, (uint64_t) 1) == MEMCACHED_FAILURE) {
View
4 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)
}
}
View
3  tests/experimental/moduleinfo.phpt
@@ -25,10 +25,9 @@ memcached.compression_type => %s => %s
memcached.serializer => %s => %s
memcached.sess_binary => %d => %d
memcached.sess_consistent_hash => %d => %d
-memcached.sess_consistent_hashing => %d => %d
memcached.sess_lock_wait => %d => %d
memcached.sess_locking => %d => %d
memcached.sess_number_of_replicas => %d => %d
memcached.sess_prefix => %s => %s
memcached.sess_randomize_replica_read => %d => %d
-memcached.sess_remove_failed => %d => %d
View
16 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)
}
}
View
4 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
Something went wrong with that request. Please try again.