1. 30 Jul, 2018 3 commits
  2. 03 Jul, 2018 1 commit
  3. 02 Jul, 2018 1 commit
  4. 24 Jun, 2018 1 commit
  5. 20 Jun, 2018 1 commit
    • Guy Benoish's avatar
      Enhance RESTORE with RDBv9 new features · b5197f1f
      Guy Benoish authored
      RESTORE now supports:
      1. Setting LRU/LFU
      2. Absolute-time TTL
      
      Other related changes:
      1. RDB loading will not override LRU bits when RDB file
         does not contain the LRU opcode.
      2. RDB loading will not set LRU/LFU bits if the server's
         maxmemory-policy does not match.
      b5197f1f
  6. 19 Jun, 2018 1 commit
  7. 12 Jun, 2018 2 commits
  8. 09 Jun, 2018 1 commit
  9. 07 Jun, 2018 2 commits
  10. 06 Jun, 2018 1 commit
  11. 30 Mar, 2018 1 commit
  12. 29 Mar, 2018 1 commit
  13. 14 Mar, 2018 1 commit
    • antirez's avatar
      Cluster: ability to prevent slaves from failing over their masters. · 432bf477
      antirez authored
      This commit, in some parts derived from PR #3041 which is no longer
      possible to merge (because the user deleted the original branch),
      implements the ability of slaves to have a special configuration
      preventing that they try to start a failover when the master is failing.
      
      There are multiple reasons for wanting this, and the feautre was
      requested in issue #3021 time ago.
      
      The differences between this patch and the original PR are the
      following:
      
      1. The flag is saved/loaded on the nodes configuration.
      2. The 'myself' node is now flag-aware, the flag is updated as needed
         when the configuration is changed via CONFIG SET.
      3. The flag name uses NOFAILOVER instead of NO_FAILOVER to be consistent
         with existing NOADDR.
      4. The redis.conf documentation was rewritten.
      
      Thanks to @deep011 for the original patch.
      432bf477
  14. 01 Mar, 2018 1 commit
  15. 27 Feb, 2018 1 commit
    • antirez's avatar
      Cluster: improve crash-recovery safety after failover auth vote. · 533d0e03
      antirez authored
      Add AE_BARRIER to the writable event loop so that slaves requesting
      votes can't be served before we re-enter the event loop in the next
      iteration, so clusterBeforeSleep() will fsync to disk in time.
      Also add the call to explicitly fsync, given that we modified the last
      vote epoch variable.
      533d0e03
  16. 18 Jan, 2018 1 commit
  17. 09 Jan, 2018 1 commit
  18. 13 Dec, 2017 1 commit
  19. 06 Dec, 2017 1 commit
    • antirez's avatar
      Change indentation and other minor details of PR #4489. · 522760fa
      antirez authored
      The main change introduced by this commit is pretending that help
      arrays are more text than code, thus indenting them at level 0. This
      improves readability, and is an old practice when defining arrays of
      C strings describing text.
      
      Additionally a few useless return statements are removed, and the HELP
      subcommand capitalized when printed to the user.
      522760fa
  20. 03 Dec, 2017 1 commit
  21. 31 Oct, 2017 1 commit
    • antirez's avatar
      Fix buffer overflows occurring reading redis.conf. · ffcf7d5a
      antirez authored
      There was not enough sanity checking in the code loading the slots of
      Redis Cluster from the nodes.conf file, this resulted into the
      attacker's ability to write data at random addresses in the process
      memory, by manipulating the index of the array. The bug seems
      exploitable using the following techique: the config file may be altered so
      that one of the nodes gets, as node ID (which is the first field inside the
      structure) some data that is actually executable: then by writing this
      address in selected places, this node ID part can be executed after a
      jump. So it is mostly just a matter of effort in order to exploit the
      bug. In practice however the issue is not very critical because the
      bug requires an unprivileged user to be able to modify the Redis cluster
      nodes configuration, and at the same time this should result in some
      gain. However Redis normally is unprivileged as well. Yet much better to
      have this fixed indeed.
      
      Fix #4278.
      ffcf7d5a
  22. 27 Jul, 2017 1 commit
  23. 20 Jul, 2017 2 commits
    • antirez's avatar
      Make representClusterNodeFlags() more robust. · a3778f3b
      antirez authored
      This function failed when an internal-only flag was set as an only flag
      in a node: the string was trimmed expecting a final comma before
      exiting the function, causing a crash. See issue #4142.
      Moreover generation of flags representation only needed at DEBUG log
      level was always performed: a waste of CPU time. This is fixed as well
      by this commit.
      a3778f3b
    • Leon Chen's avatar
      fix return wrong value of clusterDelNodeSlots · 9e7a8c02
      Leon Chen authored
      9e7a8c02
  24. 18 Jul, 2017 1 commit
  25. 11 Jul, 2017 1 commit
  26. 23 Jun, 2017 2 commits
  27. 04 Jun, 2017 1 commit
  28. 15 Apr, 2017 1 commit
    • antirez's avatar
      Cluster: discard pong times in the future. · 271733f4
      antirez authored
      However we allow for 500 milliseconds of tolerance, in order to
      avoid often discarding semantically valid info (the node is up)
      because of natural few milliseconds desync among servers even when
      NTP is used.
      
      Note that anyway we should ping the node from time to time regardless and
      discover if it's actually down from our point of view, since no update
      is accepted while we have an active ping on the node.
      
      Related to #3929.
      271733f4
  29. 14 Apr, 2017 4 commits
    • antirez's avatar
      Cluster: always add PFAIL nodes at end of gossip section. · 02777bb2
      antirez authored
      To rely on the fact that nodes in PFAIL state will be shared around by
      randomly adding them in the gossip section is a weak assumption,
      especially after changes related to sending less ping/pong packets.
      
      We want to always include gossip entries for all the nodes that are in
      PFAIL state, so that the PFAIL -> FAIL state promotion can happen much
      faster and reliably.
      
      Related to #3929.
      02777bb2
    • antirez's avatar
      Cluster: fix gossip section ping/pong times encoding. · 8c829d9e
      antirez authored
      The gossip section times are 32 bit, so cannot store the milliseconds
      time but just the seconds approximation, which is good enough for our
      uses. At the same time however, when comparing the gossip section times
      of other nodes with our node's view, we need to convert back to
      milliseconds.
      
      Related to #3929. Without this change the patch to reduce the traffic in
      the bus message does not work.
      8c829d9e
    • antirez's avatar
      6878a3fe
    • antirez's avatar
      Cluster: decrease ping/pong traffic by trusting other nodes reports. · 8f7bf284
      antirez authored
      Cluster of bigger sizes tend to have a lot of traffic in the cluster bus
      just for failure detection: a node will try to get a ping reply from
      another node no longer than when the half the node timeout would elapsed,
      in order to avoid a false positive.
      
      However this means that if we have N nodes and the node timeout is set
      to, for instance M seconds, we'll have to ping N nodes every M/2
      seconds. This N*M/2 pings will receive the same number of pongs, so
      a total of N*M packets per node. However given that we have a total of N
      nodes doing this, the total number of messages will be N*N*M.
      
      In a 100 nodes cluster with a timeout of 60 seconds, this translates
      to a total of 100*100*30 packets per second, summing all the packets
      exchanged by all the nodes.
      
      This is, as you can guess, a lot... So this patch changes the
      implementation in a very simple way in order to trust the reports of
      other nodes: if a node A reports a node B as alive at least up to
      a given time, we update our view accordingly.
      
      The problem with this approach is that it could result into a subset of
      nodes being able to reach a given node X, and preventing others from
      detecting that is actually not reachable from the majority of nodes.
      So the above algorithm is refined by trusting other nodes only if we do
      not have currently a ping pending for the node X, and if there are no
      failure reports for that node.
      
      Since each node, anyway, pings 10 other nodes every second (one node
      every 100 milliseconds), anyway eventually even trusting the other nodes
      reports, we will detect if a given node is down from our POV.
      
      Now to understand the number of packets that the cluster would exchange
      for failure detection with the patch, we can start considering the
      random PINGs that the cluster sent anyway as base line:
      Each node sends 10 packets per second, so the total traffic if no
      additioal packets would be sent, including PONG packets, would be:
      
          Total messages per second = N*10*2
      
      However by trusting other nodes gossip sections will not AWALYS prevent
      pinging nodes for the "half timeout reached" rule all the times. The
      math involved in computing the actual rate as N and M change is quite
      complex and depends also on another parameter, which is the number of
      entries in the gossip section of PING and PONG packets. However it is
      possible to compare what happens in cluster of different sizes
      experimentally. After applying this patch a very important reduction in
      the number of packets exchanged is trivial to observe, without apparent
      impacts on the failure detection performances.
      
      Actual numbers with different cluster sizes should be published in the
      Reids Cluster documentation in the future.
      
      Related to #3929.
      8f7bf284
  30. 13 Apr, 2017 1 commit
  31. 27 Mar, 2017 1 commit