From 2d2b8102ecc5b6a786a97c6c0fc49737c9088e63 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 8 Jul 2026 20:41:39 +0200 Subject: made NumShards a global const --- shards.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shards.go') 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{} { -- cgit v1.2.3