- else if (rc == MEMCACHED_END)
- {
- break;
- }
- else if (rc == MEMCACHED_SERVER_ERROR or 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.
+ }
+ else if (response_rc == MEMCACHED_END)
+ {
+ // All items have been returned
+ }
+ else if (response_rc == MEMCACHED_SERVER_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.
+ */
+ 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.