Convert GETSET to SET command to write AOF

This commit is contained in:
Lu JJ
2022-06-12 10:39:46 +08:00
committed by finley
parent 4682f254f2
commit 7a9cbb7c11

View File

@@ -390,7 +390,7 @@ func execGetSet(db *DB, args [][]byte) redis.Reply {
db.PutEntity(key, &database.DataEntity{Data: value}) db.PutEntity(key, &database.DataEntity{Data: value})
db.Persist(key) // override ttl db.Persist(key) // override ttl
db.addAof(utils.ToCmdLine3("getset", args...)) db.addAof(utils.ToCmdLine3("set", args...))
if old == nil { if old == nil {
return new(protocol.NullBulkReply) return new(protocol.NullBulkReply)
} }