aboutsummaryrefslogtreecommitdiff
path: root/pkg/commands/dbsize.go
diff options
context:
space:
mode:
authoralex <[email protected]>2026-07-12 15:00:16 +0200
committeralex <[email protected]>2026-07-12 15:00:16 +0200
commit6cb3313793bf45e197b3048f0abd2f600bf97bb5 (patch)
tree019a0995c7f9422ec9d739c77379ee7cc1a96b9c /pkg/commands/dbsize.go
parentce9d9f8b2183bc0a31bfa40e780ae07182bc7cf8 (diff)
downloadredis-clone-6cb3313793bf45e197b3048f0abd2f600bf97bb5.tar.xz
redis-clone-6cb3313793bf45e197b3048f0abd2f600bf97bb5.zip
multi exec and discardmulti/execute
Diffstat (limited to 'pkg/commands/dbsize.go')
-rw-r--r--pkg/commands/dbsize.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/pkg/commands/dbsize.go b/pkg/commands/dbsize.go
index dbe39a4..b7086a5 100644
--- a/pkg/commands/dbsize.go
+++ b/pkg/commands/dbsize.go
@@ -5,11 +5,9 @@ import (
)
func Dbsize(args []string, getShard func(k string) *core.Shard) interface{} {
- return dbInstance.ExecuteReadAll(func(shards []*core.Shard) interface{} {
- count := 0
- for _, shard := range shards {
- count += len(shard.Data)
- }
- return count
- })
+ count := 0
+ for _, shard := range dbInstance.Shards {
+ count += len(shard.Data)
+ }
+ return count
}