+ * Modified use_sort so that the option can be applied to any distribution type.
* We removed the MEMCACHED_BEHAVIOR_KETAMA_COMPAT_MODE added in 0.35. Instead use
memcached_behavior_set_distribution().
memcached_return_t run_distribution(memcached_st *ptr)
{
+ if (ptr->flags.use_sort_hosts)
+ sort_hosts(ptr);
+
switch (ptr->distribution)
{
case MEMCACHED_DISTRIBUTION_CONSISTENT:
case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY:
return update_continuum(ptr);
case MEMCACHED_DISTRIBUTION_MODULA:
- if (ptr->flags.use_sort_hosts)
- sort_hosts(ptr);
break;
case MEMCACHED_DISTRIBUTION_RANDOM:
srandom((uint32_t) time(NULL));