From 7a9cbb7c112ea2df9229bcbf17cc9c0ca259d1f8 Mon Sep 17 00:00:00 2001 From: Lu JJ <275955589@qq.com> Date: Sun, 12 Jun 2022 10:39:46 +0800 Subject: [PATCH] Convert GETSET to SET command to write AOF --- database/string.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/string.go b/database/string.go index 897e024..d3c1449 100644 --- a/database/string.go +++ b/database/string.go @@ -390,7 +390,7 @@ func execGetSet(db *DB, args [][]byte) redis.Reply { db.PutEntity(key, &database.DataEntity{Data: value}) db.Persist(key) // override ttl - db.addAof(utils.ToCmdLine3("getset", args...)) + db.addAof(utils.ToCmdLine3("set", args...)) if old == nil { return new(protocol.NullBulkReply) }