From 1d0993d84fd87ef620f60380745914bac3e77d34 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 10 Jan 2020 17:35:12 +0100 Subject: [PATCH] memcached_dump: ignore CLIENT_ERROR Illegal slab id --- libmemcached/dump.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libmemcached/dump.cc b/libmemcached/dump.cc index fcb66604..f74f3ed1 100644 --- a/libmemcached/dump.cc +++ b/libmemcached/dump.cc @@ -126,6 +126,18 @@ static memcached_return_t ascii_dump(Memcached *memc, memcached_dump_fn *callbac assert(response_rc == MEMCACHED_SUCCESS); // Just fail return response_rc; } + else if (response_rc == MEMCACHED_CLIENT_ERROR) + { + /* The maximum number of slabs has changed in the past (currently 1<<6-1), + * so ignore any client errors complaining about an illegal slab id. + */ + if (0 == strncmp(buffer, "CLIENT_ERROR Illegal slab id", sizeof("CLIENT_ERROR Illegal slab id") - 1)) { + memcached_error_free(*instance); + memcached_error_free(*memc); + } else { + return response_rc; + } + } else { // IO error of some sort must have occurred -- 2.30.2