1. 13 Dec, 2015 4 commits
  2. 11 Dec, 2015 3 commits
  3. 10 Dec, 2015 2 commits
  4. 09 Dec, 2015 1 commit
    • antirez's avatar
      Fix replicas migration by adding a new flag. · db65f6d3
      antirez authored
      Some time ago I broken replicas migration (reported in #2924).
      The idea was to prevent masters without replicas from getting replicas
      because of replica migration, I remember it to create issues with tests,
      but there is no clue in the commit message about why it was so
      undesirable.
      
      However my patch as a side effect totally ruined the concept of replicas
      migration since we want it to work also for instances that, technically,
      never had slaves in the past: promoted slaves.
      
      So now instead the ability to be targeted by replicas migration, is a
      new flag "migrate-to". It only applies to masters, and is set in the
      following two cases:
      
      1. When a master gets a slave, it is set.
      2. When a slave turns into a master because of fail over, it is set.
      
      This way replicas migration targets are only masters that used to have
      slaves, and slaves of masters (that used to have slaves... obviously)
      and are promoted.
      
      The new flag is only internal, and is never exposed in the output nor
      persisted in the nodes configuration, since all the information to
      handle it are implicit in the cluster configuration we already have.
      db65f6d3
  5. 03 Dec, 2015 1 commit
    • antirez's avatar
      Centralize slave replication handshake aborting. · c5f8c80a
      antirez authored
      Now we have a single function to call in any state of the slave
      handshake, instead of using different functions for different states
      which is error prone. Change performed in the context of issue #2479 but
      does not fix it, since should be functionally identical to the past.
      Just an attempt to make replication.c simpler to follow.
      c5f8c80a
  6. 28 Nov, 2015 1 commit
    • antirez's avatar
      fix sprintf and snprintf format string · 4916d205
      antirez authored
      There are some cases of printing unsigned integer with %d conversion
      specificator and vice versa (signed integer with %u specificator).
      
      Patch by Sergey Polovko. Backported to Redis from Disque.
      4916d205
  7. 27 Nov, 2015 3 commits
    • Itamar Haber's avatar
      Revert Lua's `redis.LOG_<level>` to original · 47daa9b0
      Itamar Haber authored
      Fixes #2898
      47daa9b0
    • antirez's avatar
      Handle wait3() errors. · 1cc7a454
      antirez authored
      My guess was that wait3() with WNOHANG could never return -1 and an
      error. However issue #2897 may possibly indicate that this could happen
      under non clear conditions. While we try to understand this better,
      better to handle a return value of -1 explicitly, otherwise in the
      case a BGREWRITE is in progress but wait3() returns -1, the effect is to
      match the first branch of the if/else block since server.rdb_child_pid
      is -1, and call backgroundSaveDoneHandler() without a good reason, that
      will, in turn, crash the Redis server with an assertion.
      1cc7a454
    • antirez's avatar
  8. 19 Nov, 2015 25 commits