aboutsummaryrefslogtreecommitdiff
path: root/shards.go
diff options
context:
space:
mode:
Diffstat (limited to 'shards.go')
-rw-r--r--shards.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/shards.go b/shards.go
index cba4dd4..c69f920 100644
--- a/shards.go
+++ b/shards.go
@@ -15,7 +15,7 @@ func (db *RedisDB) getShard(key string)*Shard{
hash.Write([]byte(key))
val := hash.Sum64()
- return db.shards[val%16]
+ return db.shards[val%NumShards]
}
func (db *RedisDB) Execute(key string, fn func(*Shard) interface{}) interface{} {