diff options
| author | alex <[email protected]> | 2026-07-08 21:11:52 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-07-08 21:11:52 +0200 |
| commit | 917b08a98cb310d05170d2ef3de9847419e3990e (patch) | |
| tree | d2c797c86ea23beb8e6926239070ff2391d6edd4 /handlers.go | |
| parent | aac1dd50b61090461cefc0263f065140be4bf50b (diff) | |
| download | redis-clone-917b08a98cb310d05170d2ef3de9847419e3990e.tar.xz redis-clone-917b08a98cb310d05170d2ef3de9847419e3990e.zip | |
fixed bug regarding DEL
Diffstat (limited to 'handlers.go')
| -rw-r--r-- | handlers.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/handlers.go b/handlers.go index 980e805..b4668f8 100644 --- a/handlers.go +++ b/handlers.go @@ -82,12 +82,12 @@ func handleDel(conn net.Conn, args []string) { conn.Write(serializeRESP(err)) return } - keys := args[:1] + keys := args[1:] deletedKeys := db.ExecuteMulti(keys, func(shards []*Shard) interface{}{ count := 0 for _, key := range keys{ shard := db.getShard(key) - _, exists := shard.data[key] + _, exists := shard.data[key] if exists { delete(shard.data, key) count += 1 |
