- LIBMEMCACHED_MEMCACHED_DELETE_END();
- return rc;
-}
-
-memcached_return memcached_mdelete(memcached_st *ptr,
- char **key, size_t *key_length,
- unsigned int number_of_keys,
- time_t expiration)
-{
- return memcached_mdelete_by_key(ptr, NULL, 0,
- key, key_length,
- number_of_keys, expiration);
-
-}
-
-memcached_return memcached_mdelete_by_key(memcached_st *ptr,
- char *master_key, size_t master_key_length,
- char **key, size_t *key_length,
- unsigned int number_of_keys,
- time_t expiration)
-{
- size_t send_length;
- memcached_return rc= MEMCACHED_SUCCESS;
- char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
- unsigned int master_server_key= 0;
- unsigned int x;
-
- LIBMEMCACHED_MEMCACHED_DELETE_START();
-
- if (ptr->hosts == NULL || ptr->number_of_hosts == 0)
- return MEMCACHED_NO_SERVERS;
-
- if (master_key && master_key_length)
- master_server_key= memcached_generate_hash(ptr, master_key, master_key_length);
-
- for (x= 0; x < number_of_keys; x++)
+ if (replicas > 1 && ptr->distribution == MEMCACHED_DISTRIBUTION_CONSISTENT)
+ {
+ if (server_key == (ptr->number_of_hosts - 1))
+ server_key= 0;
+ else
+ server_key++;
+ }
+ } while ((++replicas) < ptr->number_of_replicas);
+
+ /* As long as one object gets stored, we count this as a success */
+ while (replicas--)