memcached_quit(ptr);
break;
case MEMCACHED_BEHAVIOR_DISTRIBUTION:
- ptr->distribution= (memcached_server_distribution)(data);
- break;
+ {
+ ptr->distribution= (memcached_server_distribution)(data);
+ run_distribution(ptr);
+ break;
+ }
case MEMCACHED_BEHAVIOR_HASH:
ptr->hash= (memcached_hash)(data);
break;
case MEMCACHED_BEHAVIOR_SORT_HOSTS:
{
set_behavior_flag(ptr, MEM_USE_SORT_HOSTS, data);
-
- if (ptr->flags & MEM_USE_SORT_HOSTS)
- {
- memcached_quit(ptr);
- run_distribution(ptr);
- }
+ run_distribution(ptr);
break;
}
case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA:
{
int num= ptr->number_of_hosts * MEMCACHED_POINTS_PER_SERVER;
+ WATCHPOINT_ASSERT(ptr->continuum);
hash= hash;
memcached_continuum_item_st *begin, *end, *left, *right, *middle;