• Moti Cohen's avatar
    HFE - Avoid lazy expire if called by modules + cleanup (#13326) · ce121b92
    Moti Cohen authored
    Need to be carefull if called by modules since modules API allow to open
    and close key handler. We don't want to invalidate the handler
    underneath.
    
    * hashTypeExists(), hashTypeGetValueObject() - will return the logical
    state of the field. A flag will indicate noExpire.
    * RM_HashGet() - Will get NULL if the field expired. Fields won’t be
    deleted.
    * RM_ScanKey() - might return 0 items if all fields got expired. Fields
    won’t be deleted.
    * RM_HashSet() - If set, then override expired field. If delete, we can
    either delete or leave it to active-expiration. XX/NX - logically
    correct (Verify with tests).
    
    Nice to have (not implemented):
    * RedisModule_CloseKey() - We can local active-expire up-to 100 items. 
    
    Note:
    Length will be wrong to modules just like redis (Count expired fields).
    ce121b92
scan.tcl 2.96 KB