In dbOverwrite moduleNotifyKeyUnlink should use old val (#8381)

The module notification was using the wrong value.
This commit is contained in:
Huang Zw 2021-01-22 15:37:25 +08:00 committed by GitHub
parent f28fccd2db
commit 0232778f35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,7 +226,7 @@ void dbOverwrite(redisDb *db, robj *key, robj *val) {
/* Although the key is not really deleted from the database, we regard /* Although the key is not really deleted from the database, we regard
overwrite as two steps of unlink+add, so we still need to call the unlink overwrite as two steps of unlink+add, so we still need to call the unlink
callback of the module. */ callback of the module. */
moduleNotifyKeyUnlink(key,val); moduleNotifyKeyUnlink(key,old);
dictSetVal(db->dict, de, val); dictSetVal(db->dict, de, val);
if (server.lazyfree_lazy_server_del) { if (server.lazyfree_lazy_server_del) {