1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00

ring: fix key hashing in Ring pipeline.

This commit is contained in:
Vladimir Mihailenco
2015-06-24 15:37:41 +03:00
parent a43e6ec46d
commit 1608a33e55
3 changed files with 53 additions and 25 deletions

View File

@ -326,7 +326,7 @@ const hashSlots = 16384
func hashKey(key string) string {
if s := strings.IndexByte(key, '{'); s > -1 {
if e := strings.IndexByte(key[s+1:], '}'); e > 0 {
key = key[s+1 : s+e+1]
return key[s+1 : s+e+1]
}
}
return key