1. 01 4月, 2015 3 次提交
    • A
      Net: improve prepareClientToWrite() error handling and comments. · 60a28fad
      antirez 提交于
      When we fail to setup the write handler it does not make sense to take
      the client around, it is missing writes: whatever is a client or a slave
      anyway the connection should terminated ASAP.
      
      Moreover what the function does exactly with its return value, and in
      which case the write handler is installed on the socket, was not clear,
      so the functions comment are improved to make the goals of the function
      more obvious.
      
      Also related to #2485.
      60a28fad
    • A
      Test: be more patient waiting for servers to exit. · e42baed4
      antirez 提交于
      This should likely fix a false positive when running with the --valgrind
      option.
      e42baed4
    • O
      fixes to diskless replication. · aa67aec8
      Oran Agra 提交于
      master was closing the connection if the RDB transfer took long time.
      and also sent PINGs to the slave before it got the initial ACK, in which case the slave wouldn't be able to find the EOF marker.
      aa67aec8
  2. 30 3月, 2015 1 次提交
  3. 27 3月, 2015 2 次提交
  4. 24 3月, 2015 4 次提交
    • A
      Redis 2.9.106 (3.0.0 Release Candidate 6) · 2b5cf6bf
      antirez 提交于
      2b5cf6bf
    • A
      Replication: disconnect blocked clients when switching to slave role. · 7e78ab4b
      antirez 提交于
      Bug as old as Redis and blocking operations. It's hard to trigger since
      only happens on instance role switch, but the results are quite bad
      since an inconsistency between master and slave is created.
      
      How to trigger the bug is a good description of the bug itself.
      
      1. Client does "BLPOP mylist 0" in master.
      2. Master is turned into slave, that replicates from New-Master.
      3. Client does "LPUSH mylist foo" in New-Master.
      4. New-Master propagates write to slave.
      5. Slave receives the LPUSH, the blocked client get served.
      
      Now Master "mylist" key has "foo", Slave "mylist" key is empty.
      
      Highlights:
      
      * At step "2" above, the client remains attached, basically escaping any
        check performed during command dispatch: read only slave, in that case.
      * At step "5" the slave (that was the master), serves the blocked client
        consuming a list element, which is not consumed on the master side.
      
      This scenario is technically likely to happen during failovers, however
      since Redis Sentinel already disconnects clients using the CLIENT
      command when changing the role of the instance, the bug is avoided in
      Sentinel deployments.
      
      Closes #2473.
      7e78ab4b
    • A
      Cluster: redirection refactoring + handling of blocked clients. · 3468cd36
      antirez 提交于
      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.
      3468cd36
    • S
      create-cluster fix for stop and watch commands · d1b5c5de
      superlogical 提交于
      d1b5c5de
  5. 23 3月, 2015 5 次提交
  6. 22 3月, 2015 6 次提交
  7. 21 3月, 2015 2 次提交
    • A
      Fix typo in beforeSleep() comment. · 2d34ec60
      antirez 提交于
      2d34ec60
    • A
      Net: clientsArePaused() should not touch blocked clients. · 2d7d75ad
      antirez 提交于
      When the list of unblocked clients were processed, btype was set to
      blocking type none, but the client remained flagged with REDIS_BLOCKED.
      When timeout is reached (or when the client disconnects), unblocking it
      will trigger an assertion.
      
      There is no need to process pending requests from blocked clients, so
      now clientsArePaused() just avoid touching blocked clients.
      
      Close #2467.
      2d7d75ad
  8. 20 3月, 2015 3 次提交
    • A
      Redis 2.9.105 (3.0.0 Release Candidate 5) · 8dac5c8b
      antirez 提交于
      8dac5c8b
    • A
      Cluster: better cluster state transiction handling. · 62893f5b
      antirez 提交于
      Before we relied on the global cluster state to make sure all the hash
      slots are linked to some node, when getNodeByQuery() is called. So
      finding the hash slot unbound was checked with an assertion. However
      this is fragile. The cluster state is often updated in the
      clusterBeforeSleep() function, and not ASAP on state change, so it may
      happen to process clients with a cluster state that is 'ok' but yet
      certain hash slots set to NULL.
      
      With this commit the condition is also checked in getNodeByQuery() and
      reported with a identical error code of -CLUSTERDOWN but slightly
      different error message so that we have more debugging clue in the
      future.
      
      Root cause of issue #2288.
      62893f5b
    • A
      Cluster: move clusterBeforeSleep() call before unblocked clients processing. · 585f68ac
      antirez 提交于
      Related to issue #2288.
      585f68ac
  9. 18 3月, 2015 11 次提交
  10. 14 3月, 2015 1 次提交
    • L
      Support CLIENT commands in Redis Sentinel · b10c2b7b
      Leandro López (inkel) 提交于
      When trying to debug sentinel connections or max connections errors it
      would be very useful to have the ability to see the list of connected
      clients to a running sentinel. At the same time it would be very helpful
      to be able to name each sentinel connection or kill offending clients.
      
      This commits adds the already defined CLIENT commands back to Redis
      Sentinel.
      b10c2b7b
  11. 08 3月, 2015 1 次提交
  12. 05 3月, 2015 1 次提交
    • A
      Fix iterator for issue #2438. · 45ff739c
      antirez 提交于
      Itereator misuse due to analyzeLatencyForEvent() accessing the
      dictionary during the iteration, without the iterator being
      reclared as safe.
      45ff739c