• Meir Shpilraien (Spielrein)'s avatar
    Prevent PEJ on loading and on readonly replica. (#12304) · cefe4566
    Meir Shpilraien (Spielrein) authored
    While Redis loading data from disk (AOF or RDB), modules will get
    key space notifications. In such stage the module should not register
    any PEJ, the main reason this is forbidden is that PEJ purpose is to
    perform a write operation as a reaction to the key space notification.
    Write operations should not be performed while loading data and so
    there is no reason to register a PEJ. 
    
    Same argument also apply to readonly replica. module should not
    perform any writes as a reaction to key space notifications and so it
    should not register a PEJ.
    
    If a module need to perform some other task which is not involve
    writing, he can do it on the key space notification callback itself.
    cefe4566
module.c 559 KB