1. 24 Mar, 2014 1 commit
    • antirez's avatar
      Cache uname() output across INFO calls. · 7054f2a0
      antirez authored
      Uname was profiled to be a slow syscall. It produces always the same
      output in the context of a single execution of Redis, so calling it at
      every INFO output generation does not make too much sense.
      
      The uname utsname structure was modified as a static variable. At the
      same time a static integer was added to check if we need to call uname
      the first time.
      7054f2a0
  2. 21 Mar, 2014 1 commit
  3. 05 Mar, 2014 2 commits
    • antirez's avatar
      Document why we update peak memory in INFO. · 55b8f6ec
      antirez authored
      55b8f6ec
    • Matt Stancliff's avatar
      Force INFO used_memory_peak to match peak memory · 647a2614
      Matt Stancliff authored
      used_memory_peak only updates in serverCron every server.hz,
      but Redis can use more memory and a user can request memory
      INFO before used_memory_peak gets updated in the next
      cron run.
      
      This patch updates used_memory_peak to the current
      memory usage if the current memory usage is higher
      than the recorded used_memory_peak value.
      
      (And it only calls zmalloc_used_memory() once instead of
      twice as it was doing before.)
      647a2614
  4. 27 Feb, 2014 2 commits
    • antirez's avatar
      Initial implementation of BITPOS. · 3294f74f
      antirez authored
      It appears to work but more stress testing, and both unit tests and
      fuzzy testing, is needed in order to ensure the implementation is sane.
      3294f74f
    • antirez's avatar
      Initial implementation of BITPOS. · 25e2791e
      antirez authored
      It appears to work but more stress testing, and both unit tests and
      fuzzy testing, is needed in order to ensure the implementation is sane.
      25e2791e
  5. 17 Feb, 2014 1 commit
    • antirez's avatar
      Get absoulte config file path before processig 'dir'. · 4237f14a
      antirez authored
      The code tried to obtain the configuration file absolute path after
      processing the configuration file. However if config file was a relative
      path and a "dir" statement was processed reading the config, the absolute
      path obtained was wrong.
      
      With this fix the absolute path is obtained before processing the
      configuration while the server is still in the original directory where
      it was executed.
      4237f14a
  6. 13 Feb, 2014 1 commit
    • antirez's avatar
      Update cached time in rdbLoad() callback. · 85492dcf
      antirez authored
      server.unixtime and server.mstime are cached less precise timestamps
      that we use every time we don't need an accurate time representation and
      a syscall would be too slow for the number of calls we require.
      
      Such an example is the initialization and update process of the last
      interaction time with the client, that is used for timeouts.
      
      However rdbLoad() can take some time to load the DB, but at the same
      time it did not updated the time during DB loading. This resulted in the
      bug described in issue #1535, where in the replication process the slave
      loads the DB, creates the redisClient representation of its master, but
      the timestamp is so old that the master, under certain conditions, is
      sensed as already "timed out".
      
      Thanks to @yoav-steinberg and Redis Labs Inc for the bug report and
      analysis.
      85492dcf
  7. 12 Feb, 2014 2 commits
    • antirez's avatar
      AOF write error: retry with a frequency of 1 hz. · 96973a7c
      antirez authored
      96973a7c
    • antirez's avatar
      AOF: don't abort on write errors unless fsync is 'always'. · fadbbdd3
      antirez authored
      A system similar to the RDB write error handling is used, in which when
      we can't write to the AOF file, writes are no longer accepted until we
      are able to write again.
      
      For fsync == always we still abort on errors since there is currently no
      easy way to avoid replying with success to the user otherwise, and this
      would violate the contract with the user of only acknowledging data
      already secured on disk.
      fadbbdd3
  8. 07 Feb, 2014 2 commits
  9. 03 Feb, 2014 1 commit
  10. 31 Jan, 2014 2 commits
  11. 28 Jan, 2014 1 commit
  12. 23 Dec, 2013 1 commit
  13. 19 Dec, 2013 1 commit
  14. 11 Dec, 2013 1 commit
    • antirez's avatar
      Replication: publish the slave_repl_offset when disconnected from master. · 9a8ae5a5
      antirez authored
      When a slave was disconnected from its master the replication offset was
      reported as -1. Now it is reported as the replication offset of the
      previous master, so that failover can be performed using this value in
      order to try to select a slave with more processed data from a set of
      slaves of the old master.
      9a8ae5a5
  15. 05 Dec, 2013 1 commit
  16. 28 Nov, 2013 2 commits
  17. 21 Nov, 2013 2 commits
    • antirez's avatar
      Sentinel: test for writable config file. · 4bd1dd1c
      antirez authored
      This commit introduces a funciton called when Sentinel is ready for
      normal operations to avoid putting Sentinel specific stuff in redis.c.
      4bd1dd1c
    • antirez's avatar
      Sentinel: distinguish between is-master-down-by-addr requests. · 812f76a8
      antirez authored
      Some are just to know if the master is down, and in this case the runid
      in the request is set to "*", others are actually in order to seek for a
      vote and get elected. In the latter case the runid is set to the runid
      of the instance seeking for the vote.
      812f76a8
  18. 29 Oct, 2013 6 commits
  19. 17 Sep, 2013 1 commit
  20. 27 Aug, 2013 1 commit
  21. 22 Aug, 2013 2 commits
  22. 21 Aug, 2013 4 commits
  23. 06 Aug, 2013 2 commits
    • antirez's avatar
      Add per-db average TTL information in INFO output. · fa48b1fa
      antirez authored
      Example:
      
      db0:keys=221913,expires=221913,avg_ttl=655
      
      The algorithm uses a running average with only two samples (current and
      previous). Keys found to be expired are considered at TTL zero even if
      the actual TTL can be negative.
      
      The TTL is reported in milliseconds.
      fa48b1fa
    • antirez's avatar
      activeExpireCycle(): fix about fast cycle early start. · 31d0f341
      antirez authored
      We don't want to repeat a fast cycle too soon, the previous code was
      broken, we need to wait two times the period *since* the start of the
      previous cycle in order to avoid there is an even space between cycles:
      
      .-> start                   .-> second start
      |                           |
      +-------------+-------------+--------------+
      | first cycle |    pause    | second cycle |
      +-------------+-------------+--------------+
      
      The second and first start must be PERIOD*2 useconds apart hence the *2
      in the new code.
      31d0f341