Fixed crashes due to missed slotToKeyInit() and missed expires_cursor reset (#13315)
this PR fixes two crashes:
1. Fix missing slotToKeyInit() when using `flushdb async` under cluster
mode.
https://github.com/redis/redis/issues/13205
2. Fix missing expires_cursor reset when stopping active defrag in the
middle of defragment.
https://github.com/redis/redis/issues/13307
If we stop active defrag in the middle of defragging db->expires, if
`expires_cursor` is not reset to 0, the next time we enable active
defrag again, defragLaterStep(db, ...) will be entered. However, at this
time, `db` has been reset to NULL, which results in crash.
The affected code were removed by #11695 and #13058 in usntable, so we
just need backport this to 7.2.
Please register or sign in to comment