fix hash key
This commit is contained in:
parent
da87dee55c
commit
433cd1f8bc
|
@ -59,6 +59,6 @@ func New(dsn string, hashRadix string) *RedisClient {
|
|||
|
||||
func Hash(s string) int {
|
||||
h := fnv.New32a()
|
||||
h.Write([]byte(s))
|
||||
h.Write([]byte(strings.ToLower(s)))
|
||||
return int(h.Sum32()) % vars.RedisShardings
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue