1. 28 Nov, 2012 2 commits
  2. 11 Sep, 2012 1 commit
    • antirez's avatar
      Make sure that SELECT argument is an integer or return an error. · 3756e141
      antirez authored
      Unfortunately we had still the lame atoi() without any error checking in
      place, so "SELECT foo" would work as "SELECT 0". This was not an huge
      problem per se but some people expected that DB can be strings and not
      just numbers, and without errors you get the feeling that they can be
      numbers, but not the behavior.
      
      Now getLongFromObjectOrReply() is used as almost everybody else across
      the code, generating an error if the number is not an integer or
      overflows the long type.
      
      Thanks to @mipearson for reporting that on Twitter.
      3756e141
  3. 30 Aug, 2012 4 commits
    • antirez's avatar
      Redis 2.4.17 · 03a851e5
      antirez authored
      03a851e5
    • antirez's avatar
    • antirez's avatar
      Sentinel: Redis-side support for slave priority. · dfdbb227
      antirez authored
      A Redis slave can now be configured with a priority, that is an integer
      number that is shown in INFO output and can be get and set using the
      redis.conf file or the CONFIG GET/SET command.
      
      This field is used by Sentinel during slave election. A slave with lower
      priority is preferred. A slave with priority zero is never elected (and
      is considered to be impossible to elect even if it is the only slave
      available).
      
      A next commit will add support in the Sentinel side as well.
      dfdbb227
    • antirez's avatar
      run_id added to INFO output (backported from 2.6). · 96fbd433
      antirez authored
      This change is required to make Redis 2.4 compatible with Sentinel.
      
      The Run ID is a field that identifies a single execution of the Redis
      server. It can be useful for many purposes as it makes easy to detect if
      the instance we are talking about is the same, or if it is a different
      one or was rebooted. An application of run_id will be in the partial
      synchronization of replication, where a slave may request a partial sync
      from a given offset only if it is talking with the same master. Another
      application is in failover and monitoring scripts.
      96fbd433
  4. 22 Aug, 2012 2 commits
  5. 01 Aug, 2012 1 commit
  6. 09 Jul, 2012 3 commits
    • jokea's avatar
    • antirez's avatar
      Typo in comment. · 0332a321
      antirez authored
      0332a321
    • antirez's avatar
      REPLCONF internal command introduced. · b998ebe9
      antirez authored
      The REPLCONF command is an internal command (not designed to be directly
      used by normal clients) that allows a slave to set some replication
      related state in the master before issuing SYNC to start the
      replication.
      
      The initial motivation for this command, and the only reason currently
      it is used by the implementation, is to let the slave instance
      communicate its listening port to the slave, so that the master can
      show all the slaves with their listening ports in the "replication"
      section of the INFO output.
      
      This allows clients to auto discover and query all the slaves attached
      into a master.
      
      Currently only a single option of the REPLCONF command is supported, and
      it is called "listening-port", so the slave now starts the replication
      process with something like the following chat:
      
          REPLCONF listening-prot 6380
          SYNC
      
      Note that this works even if the master is an older version of Redis and
      does not understand REPLCONF, because the slave ignores the REPLCONF
      error.
      
      In the future REPLCONF can be used for partial replication and other
      replication related features where there is the need to exchange
      information between master and slave.
      
      NOTE: This commit also fixes a bug: the INFO outout already carried
      information about slaves, but the port was broken, and was obtained
      with getpeername(2), so it was actually just the ephemeral port used
      by the slave to connect to the master as a client.
      b998ebe9
  7. 21 Jun, 2012 1 commit
  8. 02 Jun, 2012 4 commits
  9. 23 May, 2012 6 commits
  10. 12 May, 2012 7 commits
  11. 11 May, 2012 2 commits
  12. 09 May, 2012 2 commits
  13. 02 May, 2012 1 commit
  14. 01 May, 2012 1 commit
    • Pieter Noordhuis's avatar
      Use safe dictionary iterator from KEYS · f2ffb592
      Pieter Noordhuis authored
      Every matched key in a KEYS call is checked for expiration. When the key
      is set to expire, the call to `getExpire` will assert that the key also
      exists in the main dictionary. This in turn causes a rehashing step to
      be executed. Rehashing a dictionary when there is an iterator active may
      result in the iterator emitting duplicate entries, or not emitting some
      entries at all. By using a safe iterator, the rehash step is omitted.
      f2ffb592
  15. 30 Apr, 2012 3 commits