#include "common.h"
+
/* Defines */
static uint64_t FNV_64_INIT= 0xcbf29ce484222325LL;
static uint64_t FNV_64_PRIME= 0x100000001b3LL;
}
}
break;
-#ifdef HAVE_HSIEH_HASH
case MEMCACHED_HASH_HSIEH:
{
+#ifdef HAVE_HSIEH_HASH
hash= hsieh_hash(key, key_length);
+#endif
break;
}
-#endif
case MEMCACHED_HASH_MURMUR:
{
hash= murmur_hash(key, key_length);
WATCHPOINT_ASSERT(hash);
+ if (memcached_behavior_get(ptr, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS) && ptr->next_distribution_rebuild) {
+ struct timeval now;
+
+ if (gettimeofday(&now, NULL) == 0 &&
+ now.tv_sec > ptr->next_distribution_rebuild)
+ run_distribution(ptr);
+ }
+
return dispatch_host(ptr, hash);
}