ketama_hashi return unsigned int ,but in this function you made the ret
unsigned char.
so the return just are the lower 4 bits of the (int) ret;
static unsigned int ketama_hashi( const char* inString )
{
unsigned char digest[16], ret;
ketama_md5_digest( inString, digest );
ret = ( digest[3] << 24 )
| ( digest[2] << 16 )
| ( digest[1] << 8 )
| digest[0];
return ret;
}
in file ketama.c 355 line.
---------------------------------------------------------
so this make the balance of memcaches fail.
Original issue reported on code.google.com by wangmh....@gmail.com on 28 Feb 2011 at 3:02
Original issue reported on code.google.com by
wangmh....@gmail.com
on 28 Feb 2011 at 3:02