• Gnanesh's avatar
    EXPIRE, EXPIREAT, SETEX, GETEX: Return error when expire time overflows (#8287) · 0772098b
    Gnanesh authored
    
    
    Respond with error if expire time overflows from positive to negative of vice versa.
    
    * `SETEX`, `SET EX`, `GETEX` etc would have already error on negative value,
    but now they would also error on overflows (i.e. when the input was positive but
    after the manipulation it becomes negative, which would have passed before)
    * `EXPIRE` and `EXPIREAT` was ok taking negative values (would implicitly delete
    the key), we keep that, but we do error if the user provided a value that changes
    sign when manipulated (except the case of changing sign when `basetime` is added)
    Signed-off-by: default avatarGnanesh <gnaneshkunal@outlook.com>
    Co-authored-by: default avatarOran Agra <oran@redislabs.com>
    0772098b
expire.tcl 12.2 KB