1. 26 Mar, 2015 1 commit
  2. 24 Mar, 2015 4 commits
    • antirez's avatar
      Redis 2.9.106 (3.0.0 Release Candidate 6) · 2b5cf6bf
      antirez authored
      2b5cf6bf
    • antirez's avatar
      Replication: disconnect blocked clients when switching to slave role. · 7e78ab4b
      antirez authored
      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
    • antirez's avatar
      Cluster: redirection refactoring + handling of blocked clients. · 3468cd36
      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.
      3468cd36
    • superlogical's avatar
      d1b5c5de
  3. 22 Mar, 2015 5 commits
  4. 21 Mar, 2015 8 commits
  5. 20 Mar, 2015 3 commits
    • antirez's avatar
      Redis 2.9.105 (3.0.0 Release Candidate 5) · 8dac5c8b
      antirez authored
      8dac5c8b
    • antirez's avatar
      Cluster: better cluster state transiction handling. · 62893f5b
      antirez authored
      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
    • antirez's avatar
      Cluster: move clusterBeforeSleep() call before unblocked clients processing. · 585f68ac
      antirez authored
      Related to issue #2288.
      585f68ac
  6. 18 Mar, 2015 11 commits
  7. 13 Mar, 2015 1 commit
    • Leandro López (inkel)'s avatar
      Support CLIENT commands in Redis Sentinel · b10c2b7b
      Leandro López (inkel) authored
      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
  8. 08 Mar, 2015 1 commit
  9. 04 Mar, 2015 1 commit
    • antirez's avatar
      Fix iterator for issue #2438. · 45ff739c
      antirez authored
      Itereator misuse due to analyzeLatencyForEvent() accessing the
      dictionary during the iteration, without the iterator being
      reclared as safe.
      45ff739c
  10. 27 Feb, 2015 1 commit
  11. 26 Feb, 2015 2 commits
    • antirez's avatar
      Improvements to PR #2425 · 53659404
      antirez authored
      1. Remove useless "cs" initialization.
      2. Add a "select" var to capture a condition checked multiple times.
      3. Avoid duplication of the same if (!copy) conditional.
      4. Don't increment dirty if copy is given (no deletion is performed),
         otherwise we propagate MIGRATE when not needed.
      53659404
    • Salvatore Sanfilippo's avatar
      Merge pull request #2425 from twang817/migrateCacheDbid · 968ce964
      Salvatore Sanfilippo authored
      Add last_dbid to migrateCachedSocket to avoid redundant SELECT
      968ce964
  12. 25 Feb, 2015 1 commit
  13. 13 Feb, 2015 1 commit