fix moduleNotifyKeyUnlink to open the key with READ rather than WRITE (#12156)

just a plain overlook by #9406
This commit is contained in:
Oran Agra 2023-05-11 18:16:08 +03:00 committed by GitHub
parent aac8105c9f
commit 38b8440b39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11696,7 +11696,7 @@ void moduleNotifyKeyUnlink(robj *key, robj *val, int dbid, int flags) {
} else if (flags & DB_FLAG_KEY_OVERWRITE) {
subevent = REDISMODULE_SUBEVENT_KEY_OVERWRITTEN;
}
KeyInfo info = {dbid, key, val, REDISMODULE_WRITE};
KeyInfo info = {dbid, key, val, REDISMODULE_READ};
moduleFireServerEvent(REDISMODULE_EVENT_KEY, subevent, &info);
if (val->type == OBJ_MODULE) {