• antirez's avatar
    Cluster: redirection refactoring + handling of blocked clients. · 9b7f8b1c
    antirez authored
    There was a bug in Redis Cluster caused by clients blocked in a blocking
    list pop operation, for keys no longer handled by the instance, or
    in a condition where the cluster became down after the client blocked.
    
    A typical situation is:
    
    1) BLPOP <somekey> 0
    2) <somekey> hash slot is resharded to another master.
    
    The client will block forever int this case.
    
    A symmentrical non-cluster-specific bug happens when an instance is
    turned from master to slave. In that case it is more serious since this
    will desynchronize data between slaves and masters. This other bug was
    discovered as a side effect of thinking about the bug explained and
    fixed in this commit, but will be fixed in a separated commit.
    9b7f8b1c
redis.c 150 KB