jenkins-bot has submitted this change and it was merged.

Change subject: support setting Memcached::OPT_SERVER_FAILURE_LIMIT, 
Memcached::OPT_RETRY_TIMEOUT
......................................................................


support setting Memcached::OPT_SERVER_FAILURE_LIMIT, 
Memcached::OPT_RETRY_TIMEOUT

Change-Id: Ib1fcae92b65e8fd23baee7af7ed64abd908b600e
(cherry picked from commit dcf080c16ddd23b615085cb1c26bf7d92700fcb5)
---
M includes/objectcache/MemcachedPeclBagOStuff.php
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/objectcache/MemcachedPeclBagOStuff.php 
b/includes/objectcache/MemcachedPeclBagOStuff.php
index 748c423..f962162 100644
--- a/includes/objectcache/MemcachedPeclBagOStuff.php
+++ b/includes/objectcache/MemcachedPeclBagOStuff.php
@@ -37,6 +37,8 @@
         *   - compress_threshold:  The minimum size an object must be before 
it is compressed
         *   - timeout:             The read timeout in microseconds
         *   - connect_timeout:     The connect timeout in seconds
+        *   - retry_timeout:       Time in seconds to wait before retrying a 
failed connect attempt
+        *   - server_failure_limit:  Limit for server connect failures before 
it is removed
         *   - serializer:          May be either "php" or "igbinary". Igbinary 
produces more compact
         *                          values, but serialization is much slower 
unless the php.ini option
         *                          igbinary.compact_strings is off.
@@ -61,6 +63,14 @@
                        $params['serializer'] = 'php';
                }
 
+               if ( isset( $params['retry_timeout'] ) ) {
+                       $this->client->setOption( Memcached::OPT_RETRY_TIMEOUT, 
$params['retry_timeout'] );
+               }
+
+               if ( isset ( $params['server_failure_limit'] ) ) {
+                       $this->client->setOption( 
Memcached::OPT_SERVER_FAILURE_LIMIT, $params['server_failure_limit'] );
+               }
+
                // The compression threshold is an undocumented php.ini option 
for some
                // reason. There's probably not much harm in setting it 
globally, for
                // compatibility with the settings for the PHP client.

-- 
To view, visit https://gerrit.wikimedia.org/r/68279
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1fcae92b65e8fd23baee7af7ed64abd908b600e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf6
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Asher <afeld...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to