summaryrefslogtreecommitdiffstats
path: root/452.patch
diff options
context:
space:
mode:
Diffstat (limited to '452.patch')
-rw-r--r--452.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/452.patch b/452.patch
new file mode 100644
index 0000000..499bcd4
--- /dev/null
+++ b/452.patch
@@ -0,0 +1,39 @@
+From 5921cdaad46356750e6a0cdaec474a6de55960e5 Mon Sep 17 00:00:00 2001
+From: git-hulk <hulk.website@gmail.com>
+Date: Sun, 23 Feb 2020 20:31:16 +0800
+Subject: [PATCH] FIX: store_retry_count shouldn't be set implicitly
+
+It's wired that store commands would be auto-retry implicitly while the default value of store_retry_count was 2, as well as the timeout, would be 3 times in those store commands which may confuse users. IMHO, the retry should be set explicitly instead of implicitly.
+---
+ memcached.ini | 4 ++--
+ php_memcached.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/memcached.ini b/memcached.ini
+index 5ed79bdb..79c7ef7b 100644
+--- a/memcached.ini
++++ b/memcached.ini
+@@ -131,8 +131,8 @@
+ ; This mechanism allows transparent fail-over to secondary servers when
+ ; set/increment/decrement/setMulti operations fail on the desired server in a multi-server
+ ; environment.
+-; the default is 2
+-;memcached.store_retry_count = 2
++; the default is 0
++;memcached.store_retry_count = 0
+
+ ; Sets the default for consistent hashing for new connections.
+ ; (To configure consistent hashing for session connections,
+diff --git a/php_memcached.c b/php_memcached.c
+index 50636952..272ec381 100644
+--- a/php_memcached.c
++++ b/php_memcached.c
+@@ -401,7 +401,7 @@ PHP_INI_BEGIN()
+ MEMC_INI_ENTRY("compression_factor", "1.3", OnUpdateReal, compression_factor)
+ MEMC_INI_ENTRY("compression_threshold", "2000", OnUpdateLong, compression_threshold)
+ MEMC_INI_ENTRY("serializer", SERIALIZER_DEFAULT_NAME, OnUpdateSerializer, serializer_name)
+- MEMC_INI_ENTRY("store_retry_count", "2", OnUpdateLong, store_retry_count)
++ MEMC_INI_ENTRY("store_retry_count", "0", OnUpdateLong, store_retry_count)
+
+ MEMC_INI_BOOL ("default_consistent_hash", "0", OnUpdateBool, default_behavior.consistent_hash_enabled)
+ MEMC_INI_BOOL ("default_binary_protocol", "0", OnUpdateBool, default_behavior.binary_protocol_enabled)