1. 05 Jun, 2014 1 commit
  2. 04 Jun, 2014 3 commits
    • antirez's avatar
      Fixed dbuf variable scope in luaRedisGenericCommand(). · 3758f27b
      antirez authored
      I'm not sure if while the visibility is the inner block, the fact we
      point to 'dbuf' is a problem or not, probably the stack var isx
      guaranteed to live until the function returns. However obvious code is
      better anyway.
      3758f27b
    • antirez's avatar
      Regression test for issue #1118. · 3307db49
      antirez authored
      3307db49
    • antirez's avatar
      Scripting: better Lua number -> string conversion in luaRedisGenericCommand(). · 072982d8
      antirez authored
      The lua_to*string() family of functions use a non optimal format
      specifier when converting integers to strings. This has both the problem
      of the number being converted in exponential notation, which we don't
      use as a Redis return value when floating point numbers are involed,
      and, moreover, there is a loss of precision since the default format
      specifier is not able to represent numbers that must be represented
      exactly in the IEEE 754 number mantissa.
      
      The new code handles it as a special case using a saner conversion.
      
      This fixes issue #1118.
      072982d8
  3. 28 May, 2014 1 commit
  4. 26 May, 2014 6 commits
  5. 23 May, 2014 4 commits
  6. 22 May, 2014 5 commits
  7. 21 May, 2014 3 commits
  8. 20 May, 2014 5 commits
  9. 19 May, 2014 6 commits
  10. 18 May, 2014 1 commit
  11. 15 May, 2014 5 commits
    • antirez's avatar
      Cluster: use clusterSetNodeAsMaster() during slave failover. · 67133d2f
      antirez authored
      clusterHandleSlaveFailover() was reimplementing what
      clusterSetNodeAsMaster() without any good reason.
      67133d2f
    • antirez's avatar
      Cluster: clear todo_before_sleep flags when executing actions. · 8c6e92c3
      antirez authored
      Thanks to this change, when there is some code like:
      
          clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|...);
          ... and later before returning to the event loop ...
          clusterUpdateState();
      
      The clusterUpdateState() function will clar the flag and will not be
      repeated in the clusterBeforeSleep() function. This especially important
      for config save/fsync flags which are slow to execute and not a good
      idea to repeat without a good reason.
      
      This is implemented for all the CLUSTER_TODO flags.
      8c6e92c3
    • antirez's avatar
      Fixed typo in CLUSTER RESET implementation. · 7b87cda7
      antirez authored
      7b87cda7
    • antirez's avatar
      CLUSTER RESET implemented. · 796f4ae9
      antirez authored
      The new command is able to reset a cluster node so that it starts again
      as a fresh node. By default the command performs a soft reset (the same
      as calling it as CLUSTER RESET SOFT), and the following steps are
      performed:
      
      1) All slots are set as unassigned.
      2) The list of known nodes is flushed.
      3) Node is set as master if it is a slave.
      
      When an hard reset is performed with CLUSTER RESET HARD the following
      additional operations are performed:
      
      4) A new Node ID is created at random.
      5) Epochs are set to 0.
      
      CLUSTER RESET is useful both when the sysadmin wants to reconfigure a
      node with a different role (for example turning a slave into a master)
      and for testing purposes.
      
      It also may play a role in automatically provisioned Redis Clusters,
      since it allows to reset a node back to the initial state in order to be
      reconfigured.
      796f4ae9
    • antirez's avatar
      Remove trailing spaces from cluster.c file. · 8b9d5ecb
      antirez authored
      8b9d5ecb