16 Commits

Author SHA1 Message Date
Jim Howard
8ffbd4e074 Remove redundant event loop fd processing
Reason:
https://github.com/antirez/redis/pull/1450#issuecomment-30432925

Closes #1450
2014-08-08 10:43:54 +02:00
antirez
9281336e6b ae.c event loop: API to resize the fd set size on the run. 2013-06-28 16:39:49 +02:00
guiquanz
df7a5b7157 Fixed many typos. 2013-01-19 10:59:44 +01:00
antirez
a74c0a06b5 ae.c: set errno when error is not a failing syscall.
In this way the caller is able to perform better error checking or to
use strerror() without the risk of meaningless error messages being
displayed.
2013-01-03 14:29:20 +01:00
antirez
166c35be7d Include time.h in ae.c as we now use time(). 2012-10-05 10:10:43 +02:00
Jokea
1b5c9178c3 Force expire all timer events when system clock skew is detected.
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. */
2012-10-04 19:30:42 +02:00
jokea
4835f656d8 Set fd to writable when poll(2) detects POLLERR or POLLHUP event. 2012-05-23 11:33:32 +02:00
Dave Pacheco
ef5aa917ae first cut at event port support 2012-05-15 11:18:54 +02:00
jokea
b7a926a4c5 implement aeWait using poll(2). Fixes issue #267. 2012-04-06 11:47:17 +02:00
antirez
3fcae1cc78 A few small BSD related fixes. 2012-02-08 22:24:59 +01:00
antirez
e75a50b867 aeCreateEventLoop() cleanup on error unified in a single block (original
patch by Mukund Sivaraman, modified by me to make it simpler and to use
my coding style).
2012-01-25 10:37:32 +01:00
Mukund Sivaraman
32fb1d767e If aeApiCreate() fails, there's probably not much one can do, but in the name of consistency... 2012-01-25 10:27:37 +01:00
antirez
c117427177 ae.c: solved a memory leak with no practical effects (since the event
loop is never destroyed in Redis). Thanks to @anydot for noticing it.
2011-12-16 09:55:06 +01:00
antirez
1beff5317a Max limit to 10k clients removed, this implements feature request on issue #194 2011-12-15 11:42:40 +01:00
antirez
6df742daa7 new ae.c API to get current events by file descriptor. 2011-11-21 16:05:29 +01:00
antirez
e2641e09cc redis.c split into many different C files.
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
2010-07-01 14:38:51 +02:00