mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 08:46:56 +08:00
Convert GETSET to SET command to write AOF
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user