If a server is down, repeated stores would increment the fail count even though the...
authorAndré Cruz <andre@huge>
Wed, 3 Mar 2010 12:01:54 +0000 (12:01 +0000)
committerAndré Cruz <andre@huge>
Wed, 3 Mar 2010 12:01:54 +0000 (12:01 +0000)
This problem may exist elsewhere with mgets and deletes.

libmemcached/storage.c

index 6225af3732b15934db4d94df5e8b02be3dd95f63..ba66cf878799c3cd5eb7136ca6dbdb87df9a54ec 100644 (file)
@@ -189,7 +189,8 @@ static inline memcached_return_t memcached_send(memcached_st *ptr,
     return rc;
 
 error:
-  memcached_io_reset(instance);
+  if (rc == MEMCACHED_WRITE_FAILURE)
+    memcached_io_reset(instance);
 
   return rc;
 }