1. 02 5月, 2013 1 次提交
  2. 24 4月, 2013 1 次提交
  3. 09 4月, 2013 1 次提交
  4. 04 4月, 2013 2 次提交
  5. 14 3月, 2013 1 次提交
    • 一个手艺人's avatar
      Update config.c · 79a13b46
      一个手艺人 提交于
      Fix bug in configGetCommand function: get correct masterauth value.
      79a13b46
  6. 06 3月, 2013 3 次提交
  7. 05 3月, 2013 1 次提交
  8. 26 2月, 2013 1 次提交
  9. 14 2月, 2013 2 次提交
  10. 12 2月, 2013 2 次提交
  11. 08 2月, 2013 1 次提交
  12. 05 2月, 2013 2 次提交
    • A
      TCP_NODELAY after SYNC: changes to the implementation. · b70b459b
      antirez 提交于
      b70b459b
    • C
      Turn off TCP_NODELAY on the slave socket after SYNC. · c85647f3
      charsyam 提交于
      Further details from @antirez:
      
      It was reported by @StopForumSpam on Twitter that the Redis replication
      link was strangely using multiple TCP packets for multiple commands.
      This wastes a lot of bandwidth and is due to the TCP_NODELAY option we
      enable on the socket after accepting a new connection.
      
      However the master -> slave channel is a one-way channel since Redis
      replication is asynchronous, so there is no point in trying to reduce
      the latency, we should aim to reduce the bandwidth. For this reason this
      commit introduces the ability to disable the nagle algorithm on the
      socket after a successful SYNC.
      
      This feature is off by default because the delay can be up to 40
      milliseconds with normally configured Linux kernels.
      c85647f3
  13. 28 1月, 2013 2 次提交
  14. 19 1月, 2013 1 次提交
  15. 15 12月, 2012 1 次提交
    • A
      serverCron() frequency is now a runtime parameter (was REDIS_HZ). · f1481d4a
      antirez 提交于
      REDIS_HZ is the frequency our serverCron() function is called with.
      A more frequent call to this function results into less latency when the
      server is trying to handle very expansive background operations like
      mass expires of a lot of keys at the same time.
      
      Redis 2.4 used to have an HZ of 10. This was good enough with almost
      every setup, but the incremental key expiration algorithm was working a
      bit better under *extreme* pressure when HZ was set to 100 for Redis
      2.6.
      
      However for most users a latency spike of 30 milliseconds when million
      of keys are expiring at the same time is acceptable, on the other hand a
      default HZ of 100 in Redis 2.6 was causing idle instances to use some
      CPU time compared to Redis 2.4. The CPU usage was in the order of 0.3%
      for an idle instance, however this is a shame as more energy is consumed
      by the server, if not important resources.
      
      This commit introduces HZ as a runtime parameter, that can be queried by
      INFO or CONFIG GET, and can be modified with CONFIG SET. At the same
      time the default frequency is set back to 10.
      
      In this way we default to a sane value of 10, but allows users to
      easily switch to values up to 500 for near real-time applications if
      needed and if they are willing to pay this small CPU usage penalty.
      f1481d4a
  16. 09 11月, 2012 1 次提交
  17. 05 10月, 2012 1 次提交
    • A
      Warn when configured maxmemory value seems odd. · c43aea7e
      antirez 提交于
      This commit warns the user with a log at "warning" level if:
      
      1) After the server startup the maxmemory limit was found to be < 1MB.
      2) After a CONFIG SET command modifying the maxmemory setting the limit
      is set to a value that is smaller than the currently used memory.
      
      The behaviour of the Redis server is unmodified, and this wil not make
      the CONFIG SET command or a wrong configuration in redis.conf less
      likely to create problems, but at least this will make aware most users
      about a possbile error they committed without resorting to external
      help.
      
      However no warning is issued if, as a result of loading the AOF or RDB
      file, we are very near the maxmemory setting, or key eviction will be
      needed in order to go under the specified maxmemory setting. The reason
      is that in servers configured as a cache with an aggressive
      maxmemory-policy most of the times restarting the server will cause this
      condition to happen if persistence is not switched off.
      
      This fixes issue #429.
      c43aea7e
  18. 28 8月, 2012 1 次提交
    • A
      Sentinel: Redis-side support for slave priority. · 169a44cb
      antirez 提交于
      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.
      169a44cb
  19. 23 7月, 2012 1 次提交
  20. 21 6月, 2012 1 次提交
    • A
      Fixed a timing attack on AUTH (Issue #560). · 31a1439b
      antirez 提交于
      The way we compared the authentication password using strcmp() allowed
      an attacker to gain information about the password using a well known
      class of attacks called "timing attacks".
      
      The bug appears to be practically not exploitable in most modern systems
      running Redis since even using multiple bytes of differences in the
      input at a time instead of one the difference in running time in in the
      order of 10 nanoseconds, making it hard to exploit even on LAN. However
      attacks always get better so we are providing a fix ASAP.
      
      The new implementation uses two fixed length buffers and a constant time
      comparison function, with the goal of:
      
      1) Completely avoid leaking information about the content of the
      password, since the comparison is always performed between 512
      characters and without conditionals.
      2) Partially avoid leaking information about the length of the
      password.
      
      About "2" we still have a stage in the code where the real password and
      the user provided password are copied in the static buffers, we also run
      two strlen() operations against the two inputs, so the running time
      of the comparison is a fixed amount plus a time proportional to
      LENGTH(A)+LENGTH(B). This means that the absolute time of the operation
      performed is still related to the length of the password in some way,
      but there is no way to change the input in order to get a difference in
      the execution time in the comparison that is not just proportional to
      the string provided by the user (because the password length is fixed).
      
      Thus in practical terms the user should try to discover LENGTH(PASSWORD)
      looking at the whole execution time of the AUTH command and trying to
      guess a proportionality between the whole execution time and the
      password length: this appears to be mostly unfeasible in the real world.
      
      Also protecting from this attack is not very useful in the case of Redis
      as a brute force attack is anyway feasible if the password is too short,
      while with a long password makes it not an issue that the attacker knows
      the length.
      31a1439b
  21. 18 4月, 2012 1 次提交
  22. 13 4月, 2012 2 次提交
    • A
      Stop access to global vars. Not configurable. · 6663653f
      antirez 提交于
      After considering the interaction between ability to delcare globals in
      scripts using the 'global' function, and the complexities related to
      hanlding replication and AOF in a sane way with globals AND ability to
      turn protection On and Off, we reconsidered the design. The new design
      makes clear that there is only one good way to write Redis scripts, that
      is not using globals. In the rare cases state must be retained across
      calls a Redis key can be used.
      6663653f
    • A
      Scripting: globals protection can now be switched on/off. · 37b29ef2
      antirez 提交于
      37b29ef2
  23. 10 4月, 2012 1 次提交
  24. 27 3月, 2012 1 次提交
  25. 25 3月, 2012 2 次提交
    • A
      CONFIG RESETSTAT resets two more fields. · ca09ad4d
      antirez 提交于
      ca09ad4d
    • A
      New INFO field aof_delayed_fsync introduced. · c1d01b3c
      antirez 提交于
      This new field counts all the times Redis is configured with AOF enabled and
      fsync policy 'everysec', but the previous fsync performed by the
      background thread was not able to complete within two seconds, forcing
      Redis to perform a write against the AOF file while the fsync is still
      in progress (likely a blocking operation).
      c1d01b3c
  26. 21 3月, 2012 1 次提交
    • A
      Support for read-only slaves. Semantical fixes. · f3fd419f
      antirez 提交于
      This commit introduces support for read only slaves via redis.conf and CONFIG GET/SET commands. Also various semantical fixes are implemented here:
      
      1) MULTI/EXEC with only read commands now work where the server is into a state where writes (or commands increasing memory usage) are not allowed. Before this patch everything inside a transaction would fail in this conditions.
      
      2) Scripts just calling read-only commands will work against read only
      slaves, when the server is out of memory, or when persistence is into an
      error condition. Before the patch EVAL always failed in this condition.
      f3fd419f
  27. 10 3月, 2012 1 次提交
  28. 08 3月, 2012 2 次提交
  29. 24 1月, 2012 1 次提交
  30. 16 1月, 2012 1 次提交