re-generate aof file during load database from replication master; Allow master-slave role switching

This commit is contained in:
finley
2022-12-08 03:49:23 +08:00
parent a5908f5ea4
commit 0d96ad295d
11 changed files with 190 additions and 56 deletions

View File

@@ -371,7 +371,7 @@ func execCopy(mdb *MultiDB, conn redis.Connection, args [][]byte) redis.Reply {
expire := raw.(time.Time)
destDB.Expire(destKey, expire)
}
mdb.aofHandler.AddAof(conn.GetDBIndex(), utils.ToCmdLine3("copy", args...))
mdb.AddAof(conn.GetDBIndex(), utils.ToCmdLine3("copy", args...))
return protocol.MakeIntReply(1)
}