From: Trond Norbye Date: Tue, 22 Sep 2009 07:58:59 +0000 (+0200) Subject: Bug: #434495: Ignore SERVER/CLIENT_ERROR from stats cachedump X-Git-Tag: 0.34~23^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=02fae9816d644472d8fc2c1278a1d1c59b82bcff;p=awesomized%2Flibmemcached Bug: #434495: Ignore SERVER/CLIENT_ERROR from stats cachedump --- diff --git a/libmemcached/memcached_dump.c b/libmemcached/memcached_dump.c index 393e140a..5872aa40 100644 --- a/libmemcached/memcached_dump.c +++ b/libmemcached/memcached_dump.c @@ -55,6 +55,18 @@ static memcached_return ascii_dump(memcached_st *ptr, memcached_dump_func *callb } else if (rc == MEMCACHED_END) break; + else if (rc == MEMCACHED_SERVER_ERROR || rc == MEMCACHED_CLIENT_ERROR) + { + /* If we try to request stats cachedump for a slab class that is too big + * the server will return an incorrect error message: + * "MEMCACHED_SERVER_ERROR failed to allocate memory" + * This isn't really a fatal error, so let's just skip it. I want to + * fix the return value from the memcached server to a CLIENT_ERROR, + * so let's add support for that as well right now. + */ + rc= MEMCACHED_END; + break; + } else goto error; }