1. 10 Jul, 2017 1 commit
    • antirez's avatar
      Event loop: call after sleep() only from top level. · 54e4bbea
      antirez authored
      In general we do not want before/after sleep() callbacks to be called
      when we re-enter the event loop, since those calls are only designed in
      order to perform operations every main iteration of the event loop, and
      re-entering is often just a way to incrementally serve clietns with
      error messages or other auxiliary operations. However, if we call the
      callbacks, we are then forced to think at before/after sleep callbacks
      as re-entrant, which is much harder without any good need.
      
      However here there was also a clear bug: beforeSleep() was actually
      never called when re-entering the event loop. But the new afterSleep()
      callback was. This is broken and in this instance re-entering
      afterSleep() caused a modules GIL dead lock.
      54e4bbea
  2. 03 May, 2017 1 commit
  3. 04 Apr, 2016 3 commits
    • antirez's avatar
      ae.c: Fix delay until next timer event. · b9feef9a
      antirez authored
      This fix was written by Anthony LaTorre.
      The old code mis-calculated the amount of time to wait till next event.
      b9feef9a
    • antirez's avatar
      ace780c0
    • antirez's avatar
      Fix ae.c to avoid timers infinite loop. · 67b70a18
      antirez authored
      This fix was suggested by Anthony LaTorre, that provided also a good
      test case that was used to verify the fix.
      
      The problem with the old implementation is that, the time returned by
      a timer event (that is the time after it want to run again) is added
      to the event *start time*. So if the event takes, in order to run, more
      than the time it says it want to be scheduled again for running, an
      infinite loop is triggered.
      67b70a18
  4. 08 Aug, 2014 1 commit
  5. 28 Jun, 2013 1 commit
  6. 19 Jan, 2013 1 commit
  7. 03 Jan, 2013 1 commit
  8. 05 Oct, 2012 1 commit
  9. 04 Oct, 2012 1 commit
    • Jokea's avatar
      Force expire all timer events when system clock skew is detected. · b7b2a1cc
      Jokea authored
      When system time changes back, the timer will not worker properly
      hence some core functionality of redis will stop working(e.g. replication,
      bgsave, etc). See issue #633 for details.
      
      The patch saves the previous time and when a system clock skew is detected,
      it will force expire all timers.
      
      Modiifed by @antirez: the previous time was moved into the eventLoop
      structure to make sure the library is still thread safe as long as you
      use different event loops into different threads (otherwise you need
      some synchronization). More comments added about the reasoning at the
      base of the patch, that's worth reporting here:
      
      /* If the system clock is moved to the future, and then set back to the
       * right value, time events may be delayed in a random way. Often this
       * means that scheduled operations will not be performed soon enough.
       *
       * Here we try to detect system clock skews, and force all the time
       * events to be processed ASAP when this happens: the idea is that
       * processing events earlier is less dangerous than delaying them
       * indefinitely, and practice suggests it is. */
      b7b2a1cc
  10. 23 May, 2012 1 commit
  11. 15 May, 2012 1 commit
  12. 06 Apr, 2012 1 commit
  13. 08 Feb, 2012 1 commit
  14. 25 Jan, 2012 2 commits
  15. 16 Dec, 2011 1 commit
  16. 15 Dec, 2011 1 commit
  17. 21 Nov, 2011 1 commit
  18. 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
  19. 19 Feb, 2010 1 commit
  20. 28 Jan, 2010 1 commit
  21. 20 Jan, 2010 1 commit
  22. 28 Nov, 2009 2 commits
  23. 23 Nov, 2009 2 commits
  24. 22 Mar, 2009 1 commit