1. 04 Apr, 2016 2 commits
    • antirez's avatar
      ace780c0
    • antirez's avatar
      Fix ae.c to avoid timers infinite loop. · 67b70a18
      antirez authored
      This fix was suggested by Anthony LaTorre, that provided also a good
      test case that was used to verify the fix.
      
      The problem with the old implementation is that, the time returned by
      a timer event (that is the time after it want to run again) is added
      to the event *start time*. So if the event takes, in order to run, more
      than the time it says it want to be scheduled again for running, an
      infinite loop is triggered.
      67b70a18
  2. 02 Mar, 2016 4 commits
  3. 29 Feb, 2016 1 commit
  4. 26 Feb, 2016 3 commits
    • antirez's avatar
      BITFIELD: Fix #<index> form parsing. · 11745e09
      antirez authored
      11745e09
    • antirez's avatar
      BITFIELD: Support #<index> offsets form. · 2800d090
      antirez authored
      2800d090
    • antirez's avatar
      BITFIELD command initial implementation. · 70af626d
      antirez authored
      The new bitfield command is an extension to the Redis bit operations,
      where not just single bit operations are performed, but the array of
      bits composing a string, can be addressed at random, not aligned
      offsets, with any width unsigned and signed integers like u8, s5, u10
      (up to 64 bit signed integers and 63 bit unsigned integers).
      
      The BITFIELD command supports subcommands that can SET, GET, or INCRBY
      those arbitrary bit counters, with multiple overflow semantics.
      
      Trivial and credits:
      
      A similar command was imagined a few times in the past, but for
      some reason looked a bit far fetched or not well specified.
      Finally the command was proposed again in a clear form by
      Yoav Steinberg from Redis Labs, that proposed a set of commands on
      arbitrary sized integers stored at bit offsets.
      
      Starting from this proposal I wrote an initial specification of a single
      command with sub-commands similar to what Yoav envisioned, using short
      names for types definitions, and adding control on the overflow.
      
      This commit is the resulting implementation.
      
      Examples:
      
          BITFIELD mykey OVERFLOW wrap INCRBY i2 10 -1 GET i2 10
      70af626d
  5. 18 Feb, 2016 5 commits
  6. 15 Feb, 2016 1 commit
  7. 03 Feb, 2016 1 commit
  8. 02 Feb, 2016 3 commits
  9. 01 Feb, 2016 1 commit
  10. 29 Jan, 2016 9 commits
  11. 27 Jan, 2016 2 commits
    • antirez's avatar
      5bbb09ed
    • antirez's avatar
      Sentinel: improve handling of known Sentinel instances. · 751b5666
      antirez authored
      1. Bug #3035 is fixed (NULL pointer access). This was happening with the
         folling set of conditions:
      
      * For some reason one of the Sentinels, let's call it Sentinel_A, changed ID (reconfigured from scratch), but is as the same address at which it used to be.
      
      * Sentinel_A performs a failover and/or has a newer configuration compared to another Sentinel, that we call, Sentinel_B.
      
      * Sentinel_B receives an HELLO message from Sentinel_A, where the address and/or ID is mismatched, but it is reporting a newer configuration for the master they are both monitoring.
      
      2. Sentinels now must have an ID otherwise they are not loaded nor persisted in the configuration. This allows to have conflicting Sentinels with the same address since now the master->sentinels dictionary is indexed by Sentinel ID.
      
      3. The code now detects if a Sentinel is annoucing itself with an IP/port pair already busy (of another Sentinel). The old Sentinel that had the same port/pair is set as having port 0, that means, the address is invalid. We may discover the right address later via HELLO messages.
      751b5666
  12. 26 Jan, 2016 4 commits
  13. 25 Jan, 2016 1 commit
  14. 20 Jan, 2016 1 commit
  15. 19 Jan, 2016 2 commits
    • antirez's avatar
      Minor MIGRATE refactoring. · 83b862a3
      antirez authored
      Centralize cleanup of newargv in a single place.
      Add more comments to help a bit following a complex function.
      
      Related to issue #3016.
      83b862a3
    • antirez's avatar
      More variadic MIGRATE fixes. · f5a1e608
      antirez authored
      Another leak was fixed in the case of syntax error by restructuring the
      allocation strategy for the two dynamic vectors.
      
      We also make sure to always close the cached socket on I/O errors so that
      all the I/O errors are handled the same, even if we had a previously
      queued error of a different kind from the destination server.
      
      Thanks to Kevin McGehee. Related to issue #3016.
      f5a1e608