aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authoralex <[email protected]>2026-07-08 20:35:41 +0200
committeralex <[email protected]>2026-07-08 20:35:41 +0200
commit880d3ae49f178e61be809fb5d2c68d5f63ea700b (patch)
tree3919f0d42c7cd5f2fe82ea5399008c62db58801f /main.go
parent513e5e7961ecc9fe8155811d6cbb6a6c77e0638d (diff)
downloadredis-clone-880d3ae49f178e61be809fb5d2c68d5f63ea700b.tar.xz
redis-clone-880d3ae49f178e61be809fb5d2c68d5f63ea700b.zip
gave shards ids
Diffstat (limited to 'main.go')
-rw-r--r--main.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.go b/main.go
index 5e56280..ca8ab44 100644
--- a/main.go
+++ b/main.go
@@ -47,6 +47,7 @@ func main() {
for i := 0; i < numShards; i++ {
shards[i] = &Shard{
data: make(map[string]Item),
+ id: i,
}
}
db = RedisDB{shards: shards}