1. 20 Jan, 2020 1 commit
    • srzhao's avatar
      Check OOM at script start to get stable lua OOM state. · 38f6207f
      srzhao authored
      Checking OOM by `getMaxMemoryState` inside script might get different result
      with `freeMemoryIfNeededAndSafe` at script start, because lua stack and
      arguments also consume memory.
      
      This leads to memory `borderline` when memory grows near server.maxmemory:
      
      - `freeMemoryIfNeededAndSafe` at script start detects no OOM, no memory freed
      - `getMaxMemoryState` inside script detects OOM, script aborted
      
      We solve this 'borderline' issue by saving OOM state at script start to get
      stable lua OOM state.
      
      related to issue #6565 and #5250.
      38f6207f
  2. 17 Dec, 2019 3 commits
  3. 22 Nov, 2019 4 commits
  4. 07 Oct, 2019 1 commit
    • Yossi Gottlieb's avatar
      TLS: Connections refactoring and TLS support. · b087dd1d
      Yossi Gottlieb authored
      * Introduce a connection abstraction layer for all socket operations and
      integrate it across the code base.
      * Provide an optional TLS connections implementation based on OpenSSL.
      * Pull a newer version of hiredis with TLS support.
      * Tests, redis-cli updates for TLS support.
      b087dd1d
  5. 04 Oct, 2019 1 commit
  6. 02 Oct, 2019 1 commit
    • Oran Agra's avatar
      On LUA script timeout, print the script SHA to the log · 98426e98
      Oran Agra authored
      since the slowlog and other means that can help you detect the bad script
      are only exposed after the script is done. it might be a good idea to at least
      print the script name (sha) to the log when it timeouts.
      98426e98
  7. 20 Sep, 2019 2 commits
  8. 17 Sep, 2019 4 commits
  9. 16 Sep, 2019 6 commits
  10. 13 Sep, 2019 3 commits
  11. 17 Jul, 2019 1 commit
    • Oran Agra's avatar
      Module API for Forking · 56258c6b
      Oran Agra authored
      * create module API for forking child processes.
      * refactor duplicate code around creating and tracking forks by AOF and RDB.
      * child processes listen to SIGUSR1 and dies exitFromChild in order to
        eliminate a valgrind warning of unhandled signal.
      * note that BGSAVE error reply has changed.
      
      valgrind error is:
        Process terminating with default action of signal 10 (SIGUSR1)
      56258c6b
  12. 18 Mar, 2019 1 commit
  13. 29 Jan, 2019 1 commit
  14. 09 Jan, 2019 3 commits
  15. 09 Oct, 2018 1 commit
  16. 30 Sep, 2018 1 commit
  17. 11 Sep, 2018 1 commit
  18. 05 Sep, 2018 3 commits
    • antirez's avatar
      Use commands (effects) replication by default in scripts. · 7895835d
      antirez authored
      See issue #5250 and issue #5292 for more info.
      7895835d
    • antirez's avatar
      Safer script stop condition on OOM. · 7e11825e
      antirez authored
      Here the idea is that we do not want freeMemoryIfNeeded() to propagate a
      DEL command before the script and change what happens in the script
      execution once it reaches the slave. For example see this potential
      issue (in the words of @soloestoy):
      
      On master, we run the following script:
      
          if redis.call('get','key')
          then
              redis.call('set','xxx','yyy')
          end
          redis.call('set','c','d')
      
      Then when redis attempts to execute redis.call('set','xxx','yyy'), we call freeMemoryIfNeeded(), and the key may get deleted, and because redis.call('set','xxx','yyy') has already been executed on master, this script will be replicated to slave.
      
      But the slave received "DEL key" before the script, and will ignore maxmemory, so after that master has xxx and c, slave has only one key c.
      
      Note that this patch (and other related work) was authored collaboratively in
      issue #5250 with the help of @soloestoy and @oranagra.
      
      Related to issue #5250.
      7e11825e
    • antirez's avatar
      Propagate read-only scripts as SCRIPT LOAD. · 092e4de6
      antirez authored
      See issue #5250 and the new comments added to the code in this commit
      for details.
      092e4de6
  19. 03 Sep, 2018 2 commits