X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fdump.cc;h=4fcf7de2aa282ba7694dd61da33d14e53ff614d1;hb=9973d386ac8476cd09cc4d9cf7bd2234a42740c7;hp=fcb66604e41eb072089842b9345ab07d97074a63;hpb=7fa883aca713b99985cf35750ab0e2ffe6ce58e0;p=awesomized%2Flibmemcached diff --git a/libmemcached/dump.cc b/libmemcached/dump.cc index fcb66604..4fcf7de2 100644 --- a/libmemcached/dump.cc +++ b/libmemcached/dump.cc @@ -71,11 +71,7 @@ static memcached_return_t ascii_dump(Memcached *memc, memcached_dump_fn *callbac memcached_instance_st* instance= memcached_instance_fetch(memc, server_key); memcached_return_t vdo_rc; - if (memcached_success((vdo_rc= memcached_vdo(instance, vector, 3, true)))) - { - // We have sent the message to the server successfully - } - else + if (memcached_failed((vdo_rc= memcached_vdo(instance, vector, 3, true)))) { return vdo_rc; } @@ -126,6 +122,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