1. 13 Apr, 2012 2 commits
    • antirez's avatar
      Stop access to global vars. Not configurable. · 6663653f
      antirez authored
      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
    • antirez's avatar
      37b29ef2
  2. 28 Mar, 2012 2 commits
  3. 27 Mar, 2012 2 commits
  4. 25 Mar, 2012 1 commit
    • antirez's avatar
      New INFO field aof_delayed_fsync introduced. · c1d01b3c
      antirez authored
      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
  5. 24 Mar, 2012 1 commit
  6. 21 Mar, 2012 1 commit
  7. 20 Mar, 2012 2 commits
    • antirez's avatar
      DEBUG should not be flagged as w otherwise we can not call DEBUG DIGEST and... · 7dcdd281
      antirez authored
      DEBUG should not be flagged as w otherwise we can not call DEBUG DIGEST and other commands against read only slaves.
      7dcdd281
    • antirez's avatar
      Support for read-only slaves. Semantical fixes. · f3fd419f
      antirez authored
      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
  8. 19 Mar, 2012 1 commit
  9. 18 Mar, 2012 2 commits
  10. 16 Mar, 2012 1 commit
  11. 15 Mar, 2012 1 commit
    • antirez's avatar
      Fix for issue #391. · c9d3dda2
      antirez authored
      Use a simple protocol between clientsCron() and helper functions to
      understand if the client is still valind and clientsCron() should
      continue processing or if the client was freed and we should continue
      with the next one.
      c9d3dda2
  12. 14 Mar, 2012 2 commits
  13. 13 Mar, 2012 1 commit
  14. 08 Mar, 2012 2 commits
    • antirez's avatar
      Instantaneous ops/sec figure in INFO output. · 250e7f69
      antirez authored
      250e7f69
    • antirez's avatar
      run_id added to INFO output. · 91d664d6
      antirez authored
      The Run ID is a field that identifies a single execution of the Redis
      server. It can be useful for many purposes as it makes easy to detect if
      the instance we are talking about is the same, or if it is a different
      one or was rebooted. An application of run_id will be in the partial
      synchronization of replication, where a slave may request a partial sync
      from a given offset only if it is talking with the same master. Another
      application is in failover and monitoring scripts.
      91d664d6
  15. 07 Mar, 2012 4 commits
  16. 29 Feb, 2012 1 commit
  17. 28 Feb, 2012 3 commits
    • antirez's avatar
      Better system for additional commands replication. · 78d6a22d
      antirez authored
      The new code uses a more generic data structure to describe redis operations.
      The new design allows for multiple alsoPropagate() calls within the scope of a
      single command, that is useful in different contexts. For instance there
      when there are multiple clients doing BRPOPLPUSH against the same list,
      and a variadic LPUSH is performed against this list, the blocked clients
      will both be served, and we should correctly replicate multiple LPUSH
      commands after the replication of the current command.
      78d6a22d
    • antirez's avatar
      Added a new API to replicate an additional command after the replication of... · eeb34eff
      antirez authored
      Added a new API to replicate an additional command after the replication of the currently executed command, in order to propagte the LPUSH originating from RPOPLPUSH and indirectly by BRPOPLPUSH.
      eeb34eff
    • antirez's avatar
      Added command propagation API. · ad08d059
      antirez authored
      ad08d059
  18. 07 Feb, 2012 2 commits
  19. 06 Feb, 2012 2 commits
  20. 04 Feb, 2012 2 commits
    • antirez's avatar
      This fixes issue #327, is a very complex fix (unfortunately), details: · f6b32c14
      antirez authored
      1) sendReplyToClient() now no longer stops transferring data to a single
      client in the case we are out of memory (maxmemory-wise).
      
      2) in processCommand() the idea of we being out of memory is no longer
      the naive zmalloc_used_memory() > server.maxmemory. To say if we can
      accept or not write queries is up to the return value of
      freeMemoryIfNeeded(), that has full control about that.
      
      3) freeMemoryIfNeeded() now does its math without considering output
      buffers size. But at the same time it can't let the output buffers to
      put us too much outside the max memory limit, so at the same time it
      makes sure there is enough effort into delivering the output buffers to
      the slaves, calling the write handler directly.
      
      This three changes are the result of many tests, I found (partially
      empirically) that is the best way to address the problem, but maybe
      we'll find better solutions in the future.
      f6b32c14
    • antirez's avatar
      Use less memory when emitting the protocol, by using more shared objects for... · 355f8591
      antirez authored
      Use less memory when emitting the protocol, by using more shared objects for commonly emitted parts of the protocol.
      355f8591
  21. 02 Feb, 2012 3 commits
  22. 01 Feb, 2012 1 commit
    • antirez's avatar
      SORT is now more deterministic: does not accept to compare by score items that... · 2c861050
      antirez authored
      SORT is now more deterministic: does not accept to compare by score items that have scores not representing a valid double. Also items with the same score are compared lexycographically. At the same time the scripting side introduced the ability to sort the output of SORT when sort uses the BY <constant> optimization, resulting in no specific ordering. Since in this case the user may use GET, and the result of GET can be null, converted into false as Lua data type, this commit also introduces the ability to sort Lua tables containining false, only if the first (faster) attempt at using just table.sort with a single argument fails.
      2c861050
  23. 31 Jan, 2012 1 commit
    • antirez's avatar
      Order output of commands returning random arrays using table.sort when called... · 548efd91
      antirez authored
      Order output of commands returning random arrays using table.sort when called from Lua, partially fixing issue #165. The issue is yet not completely fixed since we can't add the REDIS_CMD_SORT_FOR_SCRIPT flag in SORT currently, both because it may contain NULLs and because it is not cool to re-sort everything at every call when instead this should be sorted only if BY <constant> is used.
      548efd91