• Binbin's avatar
    Fix blocking commands timeout is reset due to re-processing command (#13004) · 1bda797d
    Binbin authored
    In #11012, we will reprocess command when client is unblocked on keys,
    in some blocking commands, for example, in the XREADGROUP BLOCK
    scenario,
    because of the re-processing command, we will recalculate the block
    timeout,
    causing the blocking time to be reset.
    
    This commit add a new CLIENT_REPROCESSING_COMMAND clent flag, explicitly
    let the command know that it is being re-processed, later in
    blockForKeys
    we will not reset the timeout.
    
    Affected BLOCK cases:
    - list / zset / stream, added test cases for each.
    
    Unaffected cases:
    - module (never re-process the commands).
    - WAIT / WAITAOF (never re-process the commands).
    
    Fixes #12998.
    
    (cherry picked from commit 492021db)
    1bda797d
server.c 287 KB