1. 06 Oct, 2016 1 commit
  2. 19 Sep, 2016 1 commit
  3. 16 Sep, 2016 2 commits
  4. 15 Sep, 2016 2 commits
  5. 13 Sep, 2016 2 commits
    • antirez's avatar
      MEMORY OVERHEAD implemented (using Oran Agra initial implementation). · 8c84c962
      antirez authored
      This code was extracted from @oranagra PR #3223 and modified in order
      to provide only certain amounts of information compared to the original
      code. It was also moved from DEBUG to the newly introduced MEMORY
      command. Thanks to Oran for the implementation and the PR.
      
      It implements detailed memory usage stats that can be useful in both
      provisioning and troubleshooting memory usage in Redis.
      8c84c962
    • antirez's avatar
      objectComputeSize(): estimate collections sampling N elements. · 89dec692
      antirez authored
      For most tasks, we need the memory estimation to be O(1) by default.
      This commit also implements an initial MEMORY command.
      Note that objectComputeSize() takes the number of samples to check as
      argument, so MEMORY should be able to get the sample size as option
      to make precision VS CPU tradeoff tunable.
      
      Related to: PR #3223.
      89dec692
  6. 09 Sep, 2016 2 commits
  7. 09 Aug, 2016 1 commit
  8. 03 Aug, 2016 2 commits
    • antirez's avatar
      Security: Cross Protocol Scripting protection. · a81a92ca
      antirez authored
      This is an attempt at mitigating problems due to cross protocol
      scripting, an attack targeting services using line oriented protocols
      like Redis that can accept HTTP requests as valid protocol, by
      discarding the invalid parts and accepting the payloads sent, for
      example, via a POST request.
      
      For this to be effective, when we detect POST and Host: and terminate
      the connection asynchronously, the networking code was modified in order
      to never process further input. It was later verified that in a
      pipelined request containing a POST command, the successive commands are
      not executed.
      a81a92ca
    • antirez's avatar
      Fix comment over 80 cols. · ede6e22c
      antirez authored
      ede6e22c
  9. 27 Jul, 2016 1 commit
    • antirez's avatar
      Ability of slave to announce arbitrary ip/port to master. · 55385f99
      antirez authored
      This feature is useful, especially in deployments using Sentinel in
      order to setup Redis HA, where the slave is executed with NAT or port
      forwarding, so that the auto-detected port/ip addresses, as listed in
      the "INFO replication" output of the master, or as provided by the
      "ROLE" command, don't match the real addresses at which the slave is
      reachable for connections.
      55385f99
  10. 21 Jul, 2016 1 commit
    • antirez's avatar
      Avoid simultaneous RDB and AOF child process. · 0a628e51
      antirez authored
      This patch, written in collaboration with Oran Agra (@oranagra) is a companion
      to 780a8b1d. Together the two patches should avoid that the AOF and RDB saving
      processes can be spawned at the same time. Previously conditions that
      could lead to two saving processes at the same time were:
      
      1. When AOF is enabled via CONFIG SET and an RDB saving process is
         already active.
      
      2. When the SYNC command decides to start an RDB saving process ASAP in
         order to serve a new slave that cannot partially resynchronize (but
         only if we have a disk target for replication, for diskless
         replication there is not such a problem).
      
      Condition "1" is not very severe but "2" can happen often and is
      definitely good at degrading Redis performances in an unexpected way.
      
      The two commits have the effect of always spawning RDB savings for
      replication in replicationCron() instead of attempting to start an RDB
      save synchronously. Moreover when a BGSAVE or AOF rewrite must be
      performed, they are instead just postponed using flags that will try to
      perform such operations ASAP.
      
      Finally the BGSAVE command was modified in order to accept a SCHEDULE
      option so that if an AOF rewrite is in progress, when this option is
      given, the command no longer returns an error, but instead schedules an
      RDB rewrite operation for when it will be possible to start it.
      0a628e51
  11. 20 Jul, 2016 1 commit
  12. 13 Jul, 2016 1 commit
    • antirez's avatar
      LRU: Make cross-database choices for eviction. · e423f76e
      antirez authored
      The LRU eviction code used to make local choices: for each DB visited it
      selected the best key to evict. This was repeated for each DB. However
      this means that there could be DBs with very frequently accessed keys
      that are targeted by the LRU algorithm while there were other DBs with
      many better candidates to expire.
      
      This commit attempts to fix this problem for the LRU policy. However the
      TTL policy is still not fixed by this commit. The TTL policy will be
      fixed in a successive commit.
      
      This is an initial (partial because of TTL policy) fix for issue #2647.
      e423f76e
  13. 12 Jul, 2016 1 commit
  14. 06 Jul, 2016 1 commit
  15. 01 Jul, 2016 1 commit
  16. 30 Jun, 2016 1 commit
    • antirez's avatar
      In Redis RDB check: initial POC. · e97fadb0
      antirez authored
      So far we used an external program (later executed within Redis) and
      parser in order to check RDB files for correctness. This forces, at each
      RDB format update, to have two copies of the same format implementation
      that are hard to keep in sync. Morover the former RDB checker only
      checked the very high-level format of the file, without actually trying
      to load things in memory. Certain corruptions can only be handled by
      really loading key-value pairs.
      
      This first commit attempts to unify the Redis RDB loadig code with the
      task of checking the RDB file for correctness. More work is needed but
      it looks like a sounding direction so far.
      e97fadb0
  17. 16 Jun, 2016 1 commit
  18. 14 Jun, 2016 1 commit
  19. 08 Jun, 2016 1 commit
  20. 05 Jun, 2016 1 commit
  21. 28 May, 2016 1 commit
    • Itamar Haber's avatar
      Allow SPOP from Lua scripts · 2866e023
      Itamar Haber authored
      The existing `R` flag appears to be sufficient and there's no apparent reason why the command should be blocked.
      2866e023
  22. 10 May, 2016 2 commits
  23. 09 May, 2016 1 commit
  24. 05 May, 2016 5 commits
  25. 04 May, 2016 3 commits
  26. 22 Apr, 2016 1 commit
    • therealbill's avatar
      fix for #3187 · 14086a46
      therealbill authored
      I've renamed maxmemoryToString to evictPolicyToString since that is
      more accurate (and easier to mentally connect with the correct data), as
      well as updated the function to user server.maxmemory_policy rather than
      server.maxmemory. Now with a default config it is actually returning
      the correct policy rather than volatile-lru.
      14086a46
  27. 02 Mar, 2016 1 commit
  28. 26 Feb, 2016 1 commit
    • 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