1. 08 Jan, 2015 2 commits
    • antirez's avatar
      A few more AUX info fields added to RDB. · bfbfd0dd
      antirez authored
      bfbfd0dd
    • antirez's avatar
      RDB AUX fields support. · dee23184
      antirez authored
      This commit introduces a new RDB data type called 'aux'. It is used in
      order to insert inside an RDB file key-value pairs that may serve
      different needs, without breaking backward compatibility when new
      informations are embedded inside an RDB file. The contract between Redis
      versions is to ignore unknown aux fields when encountered.
      
      Aux fields can be used in order to:
      
      1. Augment the RDB file with info like version of Redis that created the
      RDB file, creation time, used memory while the RDB was created, and so
      forth.
      2. Add state about Redis inside the RDB file that we need to reload
      later: replication offset, previos master run ID, in order to improve
      failovers safety and allow partial resynchronization after a slave
      restart.
      3. Anything that we may want to add to RDB files without breaking the
      ability of past versions of Redis to load the file.
      dee23184
  2. 07 Jan, 2015 3 commits
  3. 24 Dec, 2014 1 commit
  4. 23 Dec, 2014 7 commits
    • Matt Stancliff's avatar
      Config: Add quicklist, remove old list options · 919e8c30
      Matt Stancliff authored
      This removes:
        - list-max-ziplist-entries
        - list-max-ziplist-value
      
      This adds:
        - list-max-ziplist-size
        - list-compress-depth
      
      Also updates config file with new sections and updates
      tests to use quicklist settings instead of old list settings.
      919e8c30
    • Matt Stancliff's avatar
      Allow compression of interior quicklist nodes · cf5750f2
      Matt Stancliff authored
      Let user set how many nodes to *not* compress.
      
      We can specify a compression "depth" of how many nodes
      to leave uncompressed on each end of the quicklist.
      
      Depth 0 = disable compression.
      Depth 1 = only leave head/tail uncompressed.
        - (read as: "skip 1 node on each end of the list before compressing")
      Depth 2 = leave head, head->next, tail->prev, tail uncompressed.
        - ("skip 2 nodes on each end of the list before compressing")
      Depth 3 = Depth 2 + head->next->next + tail->prev->prev
        - ("skip 3 nodes...")
      etc.
      
      This also:
        - updates RDB storage to use native quicklist compression (if node is
          already compressed) instead of uncompressing, generating the RDB string,
          then re-compressing the quicklist node.
        - internalizes the "fill" parameter for the quicklist so we don't
          need to pass it to _every_ function.  Now it's just a property of
          the list.
        - allows a runtime-configurable compression option, so we can
          expose a compresion parameter in the configuration file if people
          want to trade slight request-per-second performance for up to 90%+
          memory savings in some situations.
        - updates the quicklist tests to do multiple passes: 200k+ tests now.
      cf5750f2
    • Matt Stancliff's avatar
      Convert quicklist RDB to store ziplist nodes · 8919e153
      Matt Stancliff authored
      Turns out it's a huge improvement during save/reload/migrate/restore
      because, with compression enabled, we're compressing 4k or 8k
      chunks of data consisting of multiple elements in one ziplist
      instead of compressing series of smaller individual elements.
      8919e153
    • Matt Stancliff's avatar
      Convert RDB ziplist loading to sdsnative() · 73582497
      Matt Stancliff authored
      This saves us an unnecessary zmalloc, memcpy, and two frees.
      73582497
    • Matt Stancliff's avatar
      Add quicklist implementation · ff9e5b21
      Matt Stancliff authored
      This replaces individual ziplist vs. linkedlist representations
      for Redis list operations.
      
      Big thanks for all the reviews and feedback from everybody in
      https://github.com/antirez/redis/pull/2143
      ff9e5b21
    • Matt Stancliff's avatar
      Fix three simple clang analyzer warnings · d956d809
      Matt Stancliff authored
      d956d809
    • antirez's avatar
      INFO loading stats: three fixes. · 840435ad
      antirez authored
      1. Server unxtime may remain not updated while loading AOF, so ETA is
      not updated correctly.
      
      2. Number of processed byte was not initialized.
      
      3. Possible division by zero condition (likely cause of issue #1932).
      840435ad
  5. 21 Dec, 2014 1 commit
  6. 27 Oct, 2014 1 commit
  7. 23 Oct, 2014 1 commit
  8. 22 Oct, 2014 1 commit
    • antirez's avatar
      Diskless replication: set / reset socket send timeout. · d4f6a171
      antirez authored
      We need to avoid that a child -> slaves transfer can continue forever.
      We use the same timeout used as global replication timeout, which is
      documented to also affect I/O operations during bulk transfers.
      d4f6a171
  9. 17 Oct, 2014 3 commits
  10. 15 Oct, 2014 2 commits
  11. 14 Oct, 2014 2 commits
  12. 08 Oct, 2014 1 commit
    • antirez's avatar
      Define different types of RDB childs. · 2df8341c
      antirez authored
      We need to remember what is the saving strategy of the current RDB child
      process, since the configuration may be modified at runtime via CONFIG
      SET and still we'll need to understand, when the child exists, what to
      do and for what goal the process was initiated: to create an RDB file
      on disk or to write stuff directly to slave's sockets.
      2df8341c
  13. 07 Oct, 2014 1 commit
  14. 29 Sep, 2014 1 commit
  15. 18 Aug, 2014 1 commit
  16. 08 Aug, 2014 1 commit
    • Matt Stancliff's avatar
      Fix assert technical correctness · 8db020e2
      Matt Stancliff authored
      dictAdd returns DICT_OK, not REDIS_OK. They both
      have the same underlying values, so it works even though
      the code is technically wrong.
      
      Fixes #1512
      8db020e2
  17. 07 Aug, 2014 1 commit
  18. 28 Jul, 2014 1 commit
  19. 16 Jul, 2014 1 commit
  20. 08 Jul, 2014 1 commit
  21. 01 Jul, 2014 1 commit
  22. 26 Jun, 2014 1 commit
  23. 12 May, 2014 2 commits
  24. 24 Apr, 2014 1 commit
    • antirez's avatar
      Process events with processEventsWhileBlocked() when blocked. · e29d3307
      antirez authored
      When we are blocked and a few events a processed from time to time, it
      is smarter to call the event handler a few times in order to handle the
      accept, read, write, close cycle of a client in a single pass, otherwise
      there is too much latency added for clients to receive a reply while the
      server is busy in some way (for example during the DB loading).
      e29d3307
  25. 24 Mar, 2014 1 commit
    • Matt Stancliff's avatar
      Fix data loss when save AOF/RDB with no free space · b47b343f
      Matt Stancliff authored
      Previously, the (!fp) would only catch lack of free space
      under OS X.  Linux waits to discover it can't write until
      it actually writes contents to disk.
      
      (fwrite() returns success even if the underlying file
      has no free space to write into.  All the errors
      only show up at flush/sync/close time.)
      
      Fixes antirez/redis#1604
      b47b343f
  26. 13 Feb, 2014 1 commit
    • antirez's avatar
      Update cached time in rdbLoad() callback. · 51bd9da1
      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.
      51bd9da1