Fix memdump unexpected errors
This commit is contained in:
parent
9206866cde
commit
2612f2ce77
@ -0,0 +1,33 @@
|
||||
From e96f7e024e860a67424282efd6dcc11cbb2b681d Mon Sep 17 00:00:00 2001
|
||||
From: lingsheng <lingsheng@huawei.com>
|
||||
Date: Fri, 30 Oct 2020 16:00:14 +0800
|
||||
Subject: [PATCH] Ignore specific errors from memcached_dump
|
||||
https://github.com/php-memcached-dev/php-memcached/pull/315
|
||||
|
||||
Signed-off-by: lingsheng <lingsheng@huawei.com>
|
||||
---
|
||||
clients/memdump.cc | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/clients/memdump.cc b/clients/memdump.cc
|
||||
index 48c35d3..5c6d693 100644
|
||||
--- a/clients/memdump.cc
|
||||
+++ b/clients/memdump.cc
|
||||
@@ -123,7 +123,13 @@ int main(int argc, char *argv[])
|
||||
memcached_return_t rc= memcached_dump(memc, callbacks, NULL, 1);
|
||||
|
||||
int exit_code= EXIT_SUCCESS;
|
||||
- if (memcached_failed(rc))
|
||||
+ /* Ignore two errors. libmemcached has a hardcoded loop of 200 slab
|
||||
+ * classes that matches memcached < 1.4.24, at which version the server
|
||||
+ * has only 63 slabs and throws an error when requesting the 64th slab.
|
||||
+ *
|
||||
+ * In multi-server some non-deterministic number of elements will be dropped.
|
||||
+ */
|
||||
+ if (rc != MEMCACHED_CLIENT_ERROR && rc != MEMCACHED_SERVER_ERROR && memcached_failed(rc))
|
||||
{
|
||||
if (opt_verbose)
|
||||
{
|
||||
--
|
||||
2.23.0
|
||||
|
||||
25
libmemcached-fix-memdump-version.patch
Normal file
25
libmemcached-fix-memdump-version.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From b83f34708cb7465f57edc29a2f56f8bf8ad60118 Mon Sep 17 00:00:00 2001
|
||||
From: lingsheng <lingsheng@huawei.com>
|
||||
Date: Fri, 30 Oct 2020 14:21:02 +0800
|
||||
Subject: [PATCH] fix memdump --version
|
||||
|
||||
---
|
||||
clients/memdump.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/clients/memdump.cc b/clients/memdump.cc
|
||||
index 48c35d3..ab2444e 100644
|
||||
--- a/clients/memdump.cc
|
||||
+++ b/clients/memdump.cc
|
||||
@@ -190,7 +190,7 @@ static void options_parse(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case OPT_VERSION: /* --version or -V */
|
||||
- opt_verbose= true;
|
||||
+ opt_version= true;
|
||||
break;
|
||||
|
||||
case OPT_HELP: /* --help or -h */
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Name: libmemcached
|
||||
Summary: Client library and command line tools for memcached server
|
||||
Version: 1.0.18
|
||||
Release: 16
|
||||
Release: 17
|
||||
License: BSD
|
||||
URL: http://libmemcached.org/
|
||||
#origin source:https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
|
||||
@ -15,8 +15,10 @@ Provides: bundled(bobjenkins-hash)
|
||||
Provides: libmemcached-libs
|
||||
Obsoletes: libmemcached-libs < %{version}-%{release}
|
||||
|
||||
#Patch0001: libmemcached-fix-linking-with-libpthread.patch
|
||||
Patch0001: libmemcached-fix-linking-with-libpthread.patch
|
||||
Patch0002: libmemcached-build.patch
|
||||
Patch0003: libmemcached-fix-memdump-version.patch
|
||||
Patch0004: libmemcached-Ignore-specific-errors-from-memcached_dump.patch
|
||||
|
||||
|
||||
%description
|
||||
@ -98,5 +100,8 @@ make test
|
||||
%{_mandir}/man3/hashkit*
|
||||
|
||||
%changelog
|
||||
* Fri Oct 30 2020 lingsheng <lingsheng@huawei.com> - 1.0.18-17
|
||||
- Fix memdump unexpected errors
|
||||
|
||||
* Fri Feb 28 2020 zhouyihang <zhouyihang1@huawei.com> - 1.0.18-16
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user