• uriyage's avatar
    Do not watch keys for dirty client (#9829) · fa48fb2d
    uriyage authored
    
    
    Currently, the watching clients are marked as dirty when a watched
    key is touched, but we continue watching the keys for no reason.
    Then, when the same key is touched again, we iterate again on the
    watching clients list and mark all clients as dirty again.
    Only when the exec/unwatch command is issued will the client be
    removed from the key->watching_clients list. The same applies when
    a dirty client calls the WATCH command. The key will be added to be
    watched by the client even if it has no effect.
    
    In the field, no performance degradation was observed as a result of the
    current implementation; it is merely a cleanup with possible memory and
    performance gains in some situations.
    Co-authored-by: default avatarOran Agra <oran@redislabs.com>
    fa48fb2d
multi.c 15.8 KB