1. 06 Mar, 2015 1 commit
  2. 08 Aug, 2014 1 commit
  3. 26 Jun, 2014 1 commit
  4. 26 Mar, 2013 3 commits
    • antirez's avatar
      Transactions: propagate MULTI/EXEC only when needed. · 71f3e743
      antirez authored
      MULTI/EXEC is now propagated to the AOF / Slaves only once we encounter
      the first command that is not a read-only one inside the transaction.
      
      The old behavior was to always propagate an empty MULTI/EXEC block when
      the transaction was composed just of read only commands, or even
      completely empty. This created two problems:
      
      1) It's a bandwidth waste in the replication link and a space waste
         inside the AOF file.
      
      2) We used to always increment server.dirty to force the propagation of
         the EXEC command, resulting into triggering RDB saves more often
         than needed.
      
      Note: even read-only commands may also trigger writes that will be
      propagated, when we access a key that is found expired and Redis will
      synthesize a DEL operation. However there is no need for this to stay
      inside the transaction itself, but only to be ordered.
      
      So for instance something like:
      
          MULTI
          GET foo
          SET key zap
          EXEC
      
      May be propagated into:
      
          DEL foo
          MULTI
          SET key zap
          EXEC
      
      While the DEL is outside the transaction, the commands are delivered in
      the right order and it is not possible for other commands to be inserted
      between DEL and MULTI.
      71f3e743
    • antirez's avatar
      02c269e2
    • antirez's avatar
      Transactions: use the propagate() API to propagate MULTI. · 2f497340
      antirez authored
      The behavior is the same, but the code is now cleaner and uses the
      proper interface instead of dealing directly with AOF/replication
      functions.
      2f497340
  5. 12 Feb, 2013 1 commit
  6. 19 Jan, 2013 1 commit
  7. 22 Nov, 2012 1 commit
    • antirez's avatar
      Safer handling of MULTI/EXEC on errors. · 3d139127
      antirez authored
      After the transcation starts with a MULIT, the previous behavior was to
      return an error on problems such as maxmemory limit reached. But still
      to execute the transaction with the subset of queued commands on EXEC.
      
      While it is true that the client was able to check for errors
      distinguish QUEUED by an error reply, MULTI/EXEC in most client
      implementations uses pipelining for speed, so all the commands and EXEC
      are sent without caring about replies.
      
      With this change:
      
      1) EXEC fails if at least one command was not queued because of an
      error. The EXECABORT error is used.
      2) A generic error is always reported on EXEC.
      3) The client DISCARDs the MULTI state after a failed EXEC, otherwise
      pipelining multiple transactions would be basically impossible:
      After a failed EXEC the next transaction would be simply queued as
      the tail of the previous transaction.
      3d139127
  8. 08 Nov, 2012 1 commit
  9. 16 Oct, 2012 1 commit
    • antirez's avatar
      Fix MULTI / EXEC rendering in MONITOR output. · a1b1c1ea
      antirez authored
      Before of this commit it used to be like this:
      
      MULTI
      EXEC
      ... actual commands of the transaction ...
      
      Because after all that is the natural order of things. Transaction
      commands are queued and executed *only after* EXEC is called.
      
      However this makes debugging with MONITOR a mess, so the code was
      modified to provide a coherent output.
      
      What happens is that MULTI is rendered in the MONITOR output as far as
      possible, instead EXEC is propagated only after the transaction is
      executed, or even in the case it fails because of WATCH, so in this case
      you'll simply see:
      
      MULTI
      EXEC
      
      An empty transaction.
      a1b1c1ea
  10. 20 Mar, 2012 1 commit
    • 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
  11. 02 Feb, 2012 1 commit
  12. 21 Dec, 2011 1 commit
  13. 25 Nov, 2011 1 commit
  14. 04 Oct, 2011 1 commit
  15. 08 Jul, 2011 1 commit
    • antirez's avatar
      Take a pointer to the relevant entry of the command table in the client... · 09e2d9ee
      antirez authored
      Take a pointer to the relevant entry of the command table in the client structure. This is generally a more sounding design, simplifies a few functions prototype, and as a side effect fixes a bug related to the conversion of EXPIRE -1 to DEL: before of this fix Redis tried to convert it into an EXPIREAT in the AOF code, regardless of our rewrite of the command.
      09e2d9ee
  16. 23 Feb, 2011 1 commit
  17. 03 Nov, 2010 1 commit
  18. 02 Sep, 2010 2 commits
  19. 01 Jul, 2010 1 commit
    • antirez's avatar
      redis.c split into many different C files. · e2641e09
      antirez authored
      networking related stuff moved into networking.c
      
      moved more code
      
      more work on layout of source code
      
      SDS instantaneuos memory saving. By Pieter and Salvatore at VMware ;)
      
      cleanly compiling again after the first split, now splitting it in more C files
      
      moving more things around... work in progress
      
      split replication code
      
      splitting more
      
      Sets split
      
      Hash split
      
      replication split
      
      even more splitting
      
      more splitting
      
      minor change
      e2641e09