- if (list[host_index].port == MEMCACHED_DEFAULT_PORT)
- {
- sort_host_length= (size_t) snprintf(sort_host, MEMCACHED_MAX_HOST_SORT_LENGTH,
- "%s-%d",
- list[host_index].hostname,
- pointer_index - 1);
+ // Spymemcached ketema key format is: hostname/ip:port-index
+ // If hostname is not available then: /ip:port-index
+ sort_host_length= (size_t) snprintf(sort_host, MEMCACHED_MAX_HOST_SORT_LENGTH,
+ "/%s:%d-%d",
+ list[host_index].hostname,
+ list[host_index].port,
+ pointer_index);
+#ifdef DEBUG
+ printf("update_continuum: key is %s\n", sort_host);
+#endif